mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-5319f1ba23b5304e/out/
matrixpilot.rs

1#![doc = "MAVLink matrixpilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1749    MAV_CMD_PREFLIGHT_STORAGE_ADVANCED = 0,
1750}
1751impl MavCmd {
1752    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1753}
1754impl Default for MavCmd {
1755    fn default() -> Self {
1756        Self::DEFAULT
1757    }
1758}
1759#[cfg_attr(feature = "ts", derive(TS))]
1760#[cfg_attr(feature = "ts", ts(export))]
1761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1763#[cfg_attr(feature = "serde", serde(tag = "type"))]
1764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1765#[repr(u32)]
1766#[doc = "Possible actions an aircraft can take to avoid a collision."]
1767pub enum MavCollisionAction {
1768    #[doc = "Ignore any potential collisions"]
1769    MAV_COLLISION_ACTION_NONE = 0,
1770    #[doc = "Report potential collision"]
1771    MAV_COLLISION_ACTION_REPORT = 1,
1772    #[doc = "Ascend or Descend to avoid threat"]
1773    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1774    #[doc = "Move horizontally to avoid threat"]
1775    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1776    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1777    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1778    #[doc = "Aircraft to fly directly back to its launch point"]
1779    MAV_COLLISION_ACTION_RTL = 5,
1780    #[doc = "Aircraft to stop in place"]
1781    MAV_COLLISION_ACTION_HOVER = 6,
1782}
1783impl MavCollisionAction {
1784    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1785}
1786impl Default for MavCollisionAction {
1787    fn default() -> Self {
1788        Self::DEFAULT
1789    }
1790}
1791#[cfg_attr(feature = "ts", derive(TS))]
1792#[cfg_attr(feature = "ts", ts(export))]
1793#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1795#[cfg_attr(feature = "serde", serde(tag = "type"))]
1796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1797#[repr(u32)]
1798#[doc = "Source of information about this collision."]
1799pub enum MavCollisionSrc {
1800    #[doc = "ID field references ADSB_VEHICLE packets"]
1801    MAV_COLLISION_SRC_ADSB = 0,
1802    #[doc = "ID field references MAVLink SRC ID"]
1803    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1804}
1805impl MavCollisionSrc {
1806    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1807}
1808impl Default for MavCollisionSrc {
1809    fn default() -> Self {
1810        Self::DEFAULT
1811    }
1812}
1813#[cfg_attr(feature = "ts", derive(TS))]
1814#[cfg_attr(feature = "ts", ts(export))]
1815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1817#[cfg_attr(feature = "serde", serde(tag = "type"))]
1818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1819#[repr(u32)]
1820#[doc = "Aircraft-rated danger from this threat."]
1821pub enum MavCollisionThreatLevel {
1822    #[doc = "Not a threat"]
1823    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1824    #[doc = "Craft is mildly concerned about this threat"]
1825    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1826    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1827    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1828}
1829impl MavCollisionThreatLevel {
1830    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1831}
1832impl Default for MavCollisionThreatLevel {
1833    fn default() -> Self {
1834        Self::DEFAULT
1835    }
1836}
1837#[cfg_attr(feature = "ts", derive(TS))]
1838#[cfg_attr(feature = "ts", ts(export))]
1839#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1841#[cfg_attr(feature = "serde", serde(tag = "type"))]
1842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1843#[repr(u32)]
1844#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1845pub enum MavComponent {
1846    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1847    MAV_COMP_ID_ALL = 0,
1848    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1849    MAV_COMP_ID_AUTOPILOT1 = 1,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER1 = 25,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER2 = 26,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER3 = 27,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER4 = 28,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER5 = 29,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER6 = 30,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER7 = 31,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER8 = 32,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER9 = 33,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER10 = 34,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER11 = 35,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER12 = 36,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER13 = 37,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER14 = 38,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER15 = 39,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER16 = 40,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER17 = 41,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER18 = 42,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER19 = 43,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER20 = 44,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER21 = 45,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER22 = 46,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER23 = 47,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER24 = 48,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER25 = 49,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER26 = 50,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER27 = 51,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER28 = 52,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER29 = 53,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER30 = 54,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER31 = 55,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER32 = 56,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER33 = 57,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER34 = 58,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER35 = 59,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER36 = 60,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER37 = 61,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER38 = 62,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER39 = 63,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER40 = 64,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER41 = 65,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER42 = 66,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER43 = 67,
1936    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1937    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER45 = 69,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER46 = 70,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER47 = 71,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER48 = 72,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER49 = 73,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER50 = 74,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER51 = 75,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER52 = 76,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER53 = 77,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER54 = 78,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER55 = 79,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER56 = 80,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER57 = 81,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER58 = 82,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER59 = 83,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER60 = 84,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER61 = 85,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER62 = 86,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER63 = 87,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER64 = 88,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER65 = 89,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER66 = 90,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER67 = 91,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER68 = 92,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER69 = 93,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER70 = 94,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER71 = 95,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER72 = 96,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER73 = 97,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER74 = 98,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER75 = 99,
2000    #[doc = "Camera #1."]
2001    MAV_COMP_ID_CAMERA = 100,
2002    #[doc = "Camera #2."]
2003    MAV_COMP_ID_CAMERA2 = 101,
2004    #[doc = "Camera #3."]
2005    MAV_COMP_ID_CAMERA3 = 102,
2006    #[doc = "Camera #4."]
2007    MAV_COMP_ID_CAMERA4 = 103,
2008    #[doc = "Camera #5."]
2009    MAV_COMP_ID_CAMERA5 = 104,
2010    #[doc = "Camera #6."]
2011    MAV_COMP_ID_CAMERA6 = 105,
2012    #[doc = "Servo #1."]
2013    MAV_COMP_ID_SERVO1 = 140,
2014    #[doc = "Servo #2."]
2015    MAV_COMP_ID_SERVO2 = 141,
2016    #[doc = "Servo #3."]
2017    MAV_COMP_ID_SERVO3 = 142,
2018    #[doc = "Servo #4."]
2019    MAV_COMP_ID_SERVO4 = 143,
2020    #[doc = "Servo #5."]
2021    MAV_COMP_ID_SERVO5 = 144,
2022    #[doc = "Servo #6."]
2023    MAV_COMP_ID_SERVO6 = 145,
2024    #[doc = "Servo #7."]
2025    MAV_COMP_ID_SERVO7 = 146,
2026    #[doc = "Servo #8."]
2027    MAV_COMP_ID_SERVO8 = 147,
2028    #[doc = "Servo #9."]
2029    MAV_COMP_ID_SERVO9 = 148,
2030    #[doc = "Servo #10."]
2031    MAV_COMP_ID_SERVO10 = 149,
2032    #[doc = "Servo #11."]
2033    MAV_COMP_ID_SERVO11 = 150,
2034    #[doc = "Servo #12."]
2035    MAV_COMP_ID_SERVO12 = 151,
2036    #[doc = "Servo #13."]
2037    MAV_COMP_ID_SERVO13 = 152,
2038    #[doc = "Servo #14."]
2039    MAV_COMP_ID_SERVO14 = 153,
2040    #[doc = "Gimbal #1."]
2041    MAV_COMP_ID_GIMBAL = 154,
2042    #[doc = "Logging component."]
2043    MAV_COMP_ID_LOG = 155,
2044    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2045    MAV_COMP_ID_ADSB = 156,
2046    #[doc = "On Screen Display (OSD) devices for video links."]
2047    MAV_COMP_ID_OSD = 157,
2048    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2049    MAV_COMP_ID_PERIPHERAL = 158,
2050    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2051    #[doc = "Gimbal ID for QX1."]
2052    MAV_COMP_ID_QX1_GIMBAL = 159,
2053    #[doc = "FLARM collision alert component."]
2054    MAV_COMP_ID_FLARM = 160,
2055    #[doc = "Parachute component."]
2056    MAV_COMP_ID_PARACHUTE = 161,
2057    #[doc = "Winch component."]
2058    MAV_COMP_ID_WINCH = 169,
2059    #[doc = "Gimbal #2."]
2060    MAV_COMP_ID_GIMBAL2 = 171,
2061    #[doc = "Gimbal #3."]
2062    MAV_COMP_ID_GIMBAL3 = 172,
2063    #[doc = "Gimbal #4"]
2064    MAV_COMP_ID_GIMBAL4 = 173,
2065    #[doc = "Gimbal #5."]
2066    MAV_COMP_ID_GIMBAL5 = 174,
2067    #[doc = "Gimbal #6."]
2068    MAV_COMP_ID_GIMBAL6 = 175,
2069    #[doc = "Battery #1."]
2070    MAV_COMP_ID_BATTERY = 180,
2071    #[doc = "Battery #2."]
2072    MAV_COMP_ID_BATTERY2 = 181,
2073    #[doc = "CAN over MAVLink client."]
2074    MAV_COMP_ID_MAVCAN = 189,
2075    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2076    MAV_COMP_ID_MISSIONPLANNER = 190,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2083    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2084    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2085    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2086    MAV_COMP_ID_PATHPLANNER = 195,
2087    #[doc = "Component that plans a collision free path between two points."]
2088    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2089    #[doc = "Component that provides position estimates using VIO techniques."]
2090    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2091    #[doc = "Component that manages pairing of vehicle and GCS."]
2092    MAV_COMP_ID_PAIRING_MANAGER = 198,
2093    #[doc = "Inertial Measurement Unit (IMU) #1."]
2094    MAV_COMP_ID_IMU = 200,
2095    #[doc = "Inertial Measurement Unit (IMU) #2."]
2096    MAV_COMP_ID_IMU_2 = 201,
2097    #[doc = "Inertial Measurement Unit (IMU) #3."]
2098    MAV_COMP_ID_IMU_3 = 202,
2099    #[doc = "GPS #1."]
2100    MAV_COMP_ID_GPS = 220,
2101    #[doc = "GPS #2."]
2102    MAV_COMP_ID_GPS2 = 221,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_1 = 236,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_2 = 237,
2107    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2108    MAV_COMP_ID_ODID_TXRX_3 = 238,
2109    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2110    MAV_COMP_ID_UDP_BRIDGE = 240,
2111    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2112    MAV_COMP_ID_UART_BRIDGE = 241,
2113    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2114    MAV_COMP_ID_TUNNEL_NODE = 242,
2115    #[doc = "Illuminator"]
2116    MAV_COMP_ID_ILLUMINATOR = 243,
2117    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2118    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2119    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2120}
2121impl MavComponent {
2122    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2123}
2124impl Default for MavComponent {
2125    fn default() -> Self {
2126        Self::DEFAULT
2127    }
2128}
2129#[cfg_attr(feature = "ts", derive(TS))]
2130#[cfg_attr(feature = "ts", ts(export))]
2131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2133#[cfg_attr(feature = "serde", serde(tag = "type"))]
2134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2135#[repr(u32)]
2136#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2137#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2138pub enum MavDataStream {
2139    #[doc = "Enable all data streams"]
2140    MAV_DATA_STREAM_ALL = 0,
2141    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2142    MAV_DATA_STREAM_RAW_SENSORS = 1,
2143    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2144    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2145    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2146    MAV_DATA_STREAM_RC_CHANNELS = 3,
2147    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2148    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2149    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2150    MAV_DATA_STREAM_POSITION = 6,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA1 = 10,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA2 = 11,
2155    #[doc = "Dependent on the autopilot"]
2156    MAV_DATA_STREAM_EXTRA3 = 12,
2157}
2158impl MavDataStream {
2159    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2160}
2161impl Default for MavDataStream {
2162    fn default() -> Self {
2163        Self::DEFAULT
2164    }
2165}
2166#[cfg_attr(feature = "ts", derive(TS))]
2167#[cfg_attr(feature = "ts", ts(export))]
2168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2170#[cfg_attr(feature = "serde", serde(tag = "type"))]
2171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2172#[repr(u32)]
2173#[doc = "Enumeration of distance sensor types"]
2174pub enum MavDistanceSensor {
2175    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2176    MAV_DISTANCE_SENSOR_LASER = 0,
2177    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2178    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2179    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2180    MAV_DISTANCE_SENSOR_INFRARED = 2,
2181    #[doc = "Radar type, e.g. uLanding units"]
2182    MAV_DISTANCE_SENSOR_RADAR = 3,
2183    #[doc = "Broken or unknown type, e.g. analog units"]
2184    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2185}
2186impl MavDistanceSensor {
2187    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2188}
2189impl Default for MavDistanceSensor {
2190    fn default() -> Self {
2191        Self::DEFAULT
2192    }
2193}
2194#[cfg_attr(feature = "ts", derive(TS))]
2195#[cfg_attr(feature = "ts", ts(export))]
2196#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2198#[cfg_attr(feature = "serde", serde(tag = "type"))]
2199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2200#[repr(u32)]
2201#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2202pub enum MavDoRepositionFlags {
2203    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2204    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2205}
2206impl MavDoRepositionFlags {
2207    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2208}
2209impl Default for MavDoRepositionFlags {
2210    fn default() -> Self {
2211        Self::DEFAULT
2212    }
2213}
2214#[cfg_attr(feature = "ts", derive(TS))]
2215#[cfg_attr(feature = "ts", ts(export))]
2216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2218#[cfg_attr(feature = "serde", serde(tag = "type"))]
2219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2220#[repr(u32)]
2221#[doc = "Enumeration of estimator types"]
2222pub enum MavEstimatorType {
2223    #[doc = "Unknown type of the estimator."]
2224    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2225    #[doc = "This is a naive estimator without any real covariance feedback."]
2226    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2227    #[doc = "Computer vision based estimate. Might be up to scale."]
2228    MAV_ESTIMATOR_TYPE_VISION = 2,
2229    #[doc = "Visual-inertial estimate."]
2230    MAV_ESTIMATOR_TYPE_VIO = 3,
2231    #[doc = "Plain GPS estimate."]
2232    MAV_ESTIMATOR_TYPE_GPS = 4,
2233    #[doc = "Estimator integrating GPS and inertial sensing."]
2234    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2235    #[doc = "Estimate from external motion capturing system."]
2236    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2237    #[doc = "Estimator based on lidar sensor input."]
2238    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2239    #[doc = "Estimator on autopilot."]
2240    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2241}
2242impl MavEstimatorType {
2243    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2244}
2245impl Default for MavEstimatorType {
2246    fn default() -> Self {
2247        Self::DEFAULT
2248    }
2249}
2250#[cfg_attr(feature = "ts", derive(TS))]
2251#[cfg_attr(feature = "ts", ts(export))]
2252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2254#[cfg_attr(feature = "serde", serde(tag = "type"))]
2255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2256#[repr(u32)]
2257#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2258pub enum MavEventCurrentSequenceFlags {
2259    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2260    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2261}
2262impl MavEventCurrentSequenceFlags {
2263    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2264}
2265impl Default for MavEventCurrentSequenceFlags {
2266    fn default() -> Self {
2267        Self::DEFAULT
2268    }
2269}
2270#[cfg_attr(feature = "ts", derive(TS))]
2271#[cfg_attr(feature = "ts", ts(export))]
2272#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2274#[cfg_attr(feature = "serde", serde(tag = "type"))]
2275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2276#[repr(u32)]
2277#[doc = "Reason for an event error response."]
2278pub enum MavEventErrorReason {
2279    #[doc = "The requested event is not available (anymore)."]
2280    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2281}
2282impl MavEventErrorReason {
2283    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2284}
2285impl Default for MavEventErrorReason {
2286    fn default() -> Self {
2287        Self::DEFAULT
2288    }
2289}
2290#[cfg_attr(feature = "ts", derive(TS))]
2291#[cfg_attr(feature = "ts", ts(export))]
2292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2294#[cfg_attr(feature = "serde", serde(tag = "type"))]
2295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2296#[repr(u32)]
2297#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2298pub enum MavFrame {
2299    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2300    MAV_FRAME_GLOBAL = 0,
2301    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2302    MAV_FRAME_LOCAL_NED = 1,
2303    #[doc = "NOT a coordinate frame, indicates a mission command."]
2304    MAV_FRAME_MISSION = 2,
2305    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2306    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2307    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2308    MAV_FRAME_LOCAL_ENU = 4,
2309    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2310    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2311    MAV_FRAME_GLOBAL_INT = 5,
2312    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2313    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2314    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2315    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2316    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2317    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2318    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2319    MAV_FRAME_BODY_NED = 8,
2320    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2321    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2322    MAV_FRAME_BODY_OFFSET_NED = 9,
2323    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2324    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2325    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2326    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2327    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2328    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2329    MAV_FRAME_BODY_FRD = 12,
2330    #[deprecated = "  (Deprecated since 2019-04)"]
2331    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2332    MAV_FRAME_RESERVED_13 = 13,
2333    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2334    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2335    MAV_FRAME_RESERVED_14 = 14,
2336    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2337    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2338    MAV_FRAME_RESERVED_15 = 15,
2339    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2340    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2341    MAV_FRAME_RESERVED_16 = 16,
2342    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2343    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2344    MAV_FRAME_RESERVED_17 = 17,
2345    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2346    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2347    MAV_FRAME_RESERVED_18 = 18,
2348    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2349    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2350    MAV_FRAME_RESERVED_19 = 19,
2351    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FRD = 20,
2353    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2354    MAV_FRAME_LOCAL_FLU = 21,
2355}
2356impl MavFrame {
2357    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2358}
2359impl Default for MavFrame {
2360    fn default() -> Self {
2361        Self::DEFAULT
2362    }
2363}
2364#[cfg_attr(feature = "ts", derive(TS))]
2365#[cfg_attr(feature = "ts", ts(export))]
2366#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2368#[cfg_attr(feature = "serde", serde(tag = "type"))]
2369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2370#[repr(u32)]
2371#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2372pub enum MavFtpErr {
2373    #[doc = "None: No error"]
2374    MAV_FTP_ERR_NONE = 0,
2375    #[doc = "Fail: Unknown failure"]
2376    MAV_FTP_ERR_FAIL = 1,
2377    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2378    MAV_FTP_ERR_FAILERRNO = 2,
2379    #[doc = "InvalidDataSize: Payload size is invalid"]
2380    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2381    #[doc = "InvalidSession: Session is not currently open"]
2382    MAV_FTP_ERR_INVALIDSESSION = 4,
2383    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2384    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2385    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2386    MAV_FTP_ERR_EOF = 6,
2387    #[doc = "UnknownCommand: Unknown command / opcode"]
2388    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2389    #[doc = "FileExists: File/directory already exists"]
2390    MAV_FTP_ERR_FILEEXISTS = 8,
2391    #[doc = "FileProtected: File/directory is write protected"]
2392    MAV_FTP_ERR_FILEPROTECTED = 9,
2393    #[doc = "FileNotFound: File/directory not found"]
2394    MAV_FTP_ERR_FILENOTFOUND = 10,
2395}
2396impl MavFtpErr {
2397    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2398}
2399impl Default for MavFtpErr {
2400    fn default() -> Self {
2401        Self::DEFAULT
2402    }
2403}
2404#[cfg_attr(feature = "ts", derive(TS))]
2405#[cfg_attr(feature = "ts", ts(export))]
2406#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2408#[cfg_attr(feature = "serde", serde(tag = "type"))]
2409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2410#[repr(u32)]
2411#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2412pub enum MavFtpOpcode {
2413    #[doc = "None. Ignored, always ACKed"]
2414    MAV_FTP_OPCODE_NONE = 0,
2415    #[doc = "TerminateSession: Terminates open Read session"]
2416    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2417    #[doc = "ResetSessions: Terminates all open read sessions"]
2418    MAV_FTP_OPCODE_RESETSESSION = 2,
2419    #[doc = "ListDirectory. List files and directories in path from offset"]
2420    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2421    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2422    MAV_FTP_OPCODE_OPENFILERO = 4,
2423    #[doc = "ReadFile: Reads size bytes from offset in session"]
2424    MAV_FTP_OPCODE_READFILE = 5,
2425    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2426    MAV_FTP_OPCODE_CREATEFILE = 6,
2427    #[doc = "WriteFile: Writes size bytes to offset in session"]
2428    MAV_FTP_OPCODE_WRITEFILE = 7,
2429    #[doc = "RemoveFile: Remove file at path"]
2430    MAV_FTP_OPCODE_REMOVEFILE = 8,
2431    #[doc = "CreateDirectory: Creates directory at path"]
2432    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2433    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2434    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2435    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2436    MAV_FTP_OPCODE_OPENFILEWO = 11,
2437    #[doc = "TruncateFile: Truncate file at path to offset length"]
2438    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2439    #[doc = "Rename: Rename path1 to path2"]
2440    MAV_FTP_OPCODE_RENAME = 13,
2441    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2442    MAV_FTP_OPCODE_CALCFILECRC = 14,
2443    #[doc = "BurstReadFile: Burst download session file"]
2444    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2445    #[doc = "ACK: ACK response"]
2446    MAV_FTP_OPCODE_ACK = 128,
2447    #[doc = "NAK: NAK response"]
2448    MAV_FTP_OPCODE_NAK = 129,
2449}
2450impl MavFtpOpcode {
2451    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2452}
2453impl Default for MavFtpOpcode {
2454    fn default() -> Self {
2455        Self::DEFAULT
2456    }
2457}
2458#[cfg_attr(feature = "ts", derive(TS))]
2459#[cfg_attr(feature = "ts", ts(export))]
2460#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2462#[cfg_attr(feature = "serde", serde(tag = "type"))]
2463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2464#[repr(u32)]
2465#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2466pub enum MavFuelType {
2467    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2468    MAV_FUEL_TYPE_UNKNOWN = 0,
2469    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2470    MAV_FUEL_TYPE_LIQUID = 1,
2471    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2472    MAV_FUEL_TYPE_GAS = 2,
2473}
2474impl MavFuelType {
2475    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2476}
2477impl Default for MavFuelType {
2478    fn default() -> Self {
2479        Self::DEFAULT
2480    }
2481}
2482bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2483impl MavGeneratorStatusFlag {
2484    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2485}
2486impl Default for MavGeneratorStatusFlag {
2487    fn default() -> Self {
2488        Self::DEFAULT
2489    }
2490}
2491#[cfg_attr(feature = "ts", derive(TS))]
2492#[cfg_attr(feature = "ts", ts(export))]
2493#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2495#[cfg_attr(feature = "serde", serde(tag = "type"))]
2496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2497#[repr(u32)]
2498#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2499pub enum MavGoto {
2500    #[doc = "Hold at the current position."]
2501    MAV_GOTO_DO_HOLD = 0,
2502    #[doc = "Continue with the next item in mission execution."]
2503    MAV_GOTO_DO_CONTINUE = 1,
2504    #[doc = "Hold at the current position of the system"]
2505    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2506    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2507    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2508}
2509impl MavGoto {
2510    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2511}
2512impl Default for MavGoto {
2513    fn default() -> Self {
2514        Self::DEFAULT
2515    }
2516}
2517#[cfg_attr(feature = "ts", derive(TS))]
2518#[cfg_attr(feature = "ts", ts(export))]
2519#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2521#[cfg_attr(feature = "serde", serde(tag = "type"))]
2522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2523#[repr(u32)]
2524#[doc = "Enumeration of landed detector states"]
2525pub enum MavLandedState {
2526    #[doc = "MAV landed state is unknown"]
2527    MAV_LANDED_STATE_UNDEFINED = 0,
2528    #[doc = "MAV is landed (on ground)"]
2529    MAV_LANDED_STATE_ON_GROUND = 1,
2530    #[doc = "MAV is in air"]
2531    MAV_LANDED_STATE_IN_AIR = 2,
2532    #[doc = "MAV currently taking off"]
2533    MAV_LANDED_STATE_TAKEOFF = 3,
2534    #[doc = "MAV currently landing"]
2535    MAV_LANDED_STATE_LANDING = 4,
2536}
2537impl MavLandedState {
2538    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2539}
2540impl Default for MavLandedState {
2541    fn default() -> Self {
2542        Self::DEFAULT
2543    }
2544}
2545#[cfg_attr(feature = "ts", derive(TS))]
2546#[cfg_attr(feature = "ts", ts(export))]
2547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2549#[cfg_attr(feature = "serde", serde(tag = "type"))]
2550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2551#[repr(u32)]
2552#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2553pub enum MavMissionResult {
2554    #[doc = "mission accepted OK"]
2555    MAV_MISSION_ACCEPTED = 0,
2556    #[doc = "Generic error / not accepting mission commands at all right now."]
2557    MAV_MISSION_ERROR = 1,
2558    #[doc = "Coordinate frame is not supported."]
2559    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2560    #[doc = "Command is not supported."]
2561    MAV_MISSION_UNSUPPORTED = 3,
2562    #[doc = "Mission items exceed storage space."]
2563    MAV_MISSION_NO_SPACE = 4,
2564    #[doc = "One of the parameters has an invalid value."]
2565    MAV_MISSION_INVALID = 5,
2566    #[doc = "param1 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM1 = 6,
2568    #[doc = "param2 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM2 = 7,
2570    #[doc = "param3 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM3 = 8,
2572    #[doc = "param4 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM4 = 9,
2574    #[doc = "x / param5 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM5_X = 10,
2576    #[doc = "y / param6 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM6_Y = 11,
2578    #[doc = "z / param7 has an invalid value."]
2579    MAV_MISSION_INVALID_PARAM7 = 12,
2580    #[doc = "Mission item received out of sequence"]
2581    MAV_MISSION_INVALID_SEQUENCE = 13,
2582    #[doc = "Not accepting any mission commands from this communication partner."]
2583    MAV_MISSION_DENIED = 14,
2584    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2585    MAV_MISSION_OPERATION_CANCELLED = 15,
2586}
2587impl MavMissionResult {
2588    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2589}
2590impl Default for MavMissionResult {
2591    fn default() -> Self {
2592        Self::DEFAULT
2593    }
2594}
2595#[cfg_attr(feature = "ts", derive(TS))]
2596#[cfg_attr(feature = "ts", ts(export))]
2597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2599#[cfg_attr(feature = "serde", serde(tag = "type"))]
2600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2601#[repr(u32)]
2602#[doc = "Type of mission items being requested/sent in mission protocol."]
2603pub enum MavMissionType {
2604    #[doc = "Items are mission commands for main mission."]
2605    MAV_MISSION_TYPE_MISSION = 0,
2606    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2607    MAV_MISSION_TYPE_FENCE = 1,
2608    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2609    MAV_MISSION_TYPE_RALLY = 2,
2610    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2611    MAV_MISSION_TYPE_ALL = 255,
2612}
2613impl MavMissionType {
2614    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2615}
2616impl Default for MavMissionType {
2617    fn default() -> Self {
2618        Self::DEFAULT
2619    }
2620}
2621#[cfg_attr(feature = "ts", derive(TS))]
2622#[cfg_attr(feature = "ts", ts(export))]
2623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2625#[cfg_attr(feature = "serde", serde(tag = "type"))]
2626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2627#[repr(u32)]
2628#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2629pub enum MavMode {
2630    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2631    MAV_MODE_PREFLIGHT = 0,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_DISARMED = 80,
2634    #[doc = "System is allowed to be active, under assisted RC control."]
2635    MAV_MODE_STABILIZE_ARMED = 208,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_DISARMED = 64,
2638    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2639    MAV_MODE_MANUAL_ARMED = 192,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_DISARMED = 88,
2642    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2643    MAV_MODE_GUIDED_ARMED = 216,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_DISARMED = 92,
2646    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2647    MAV_MODE_AUTO_ARMED = 220,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_DISARMED = 66,
2650    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2651    MAV_MODE_TEST_ARMED = 194,
2652}
2653impl MavMode {
2654    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2655}
2656impl Default for MavMode {
2657    fn default() -> Self {
2658        Self::DEFAULT
2659    }
2660}
2661bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2662impl MavModeFlag {
2663    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2664}
2665impl Default for MavModeFlag {
2666    fn default() -> Self {
2667        Self::DEFAULT
2668    }
2669}
2670#[cfg_attr(feature = "ts", derive(TS))]
2671#[cfg_attr(feature = "ts", ts(export))]
2672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2674#[cfg_attr(feature = "serde", serde(tag = "type"))]
2675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2676#[repr(u32)]
2677#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2678pub enum MavModeFlagDecodePosition {
2679    #[doc = "First bit:  10000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2681    #[doc = "Second bit: 01000000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2683    #[doc = "Third bit:  00100000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2685    #[doc = "Fourth bit: 00010000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2687    #[doc = "Fifth bit:  00001000"]
2688    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2689    #[doc = "Sixth bit:   00000100"]
2690    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2691    #[doc = "Seventh bit: 00000010"]
2692    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2693    #[doc = "Eighth bit: 00000001"]
2694    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2695}
2696impl MavModeFlagDecodePosition {
2697    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2698}
2699impl Default for MavModeFlagDecodePosition {
2700    fn default() -> Self {
2701        Self::DEFAULT
2702    }
2703}
2704bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2705impl MavModeProperty {
2706    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2707}
2708impl Default for MavModeProperty {
2709    fn default() -> Self {
2710        Self::DEFAULT
2711    }
2712}
2713#[cfg_attr(feature = "ts", derive(TS))]
2714#[cfg_attr(feature = "ts", ts(export))]
2715#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2717#[cfg_attr(feature = "serde", serde(tag = "type"))]
2718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2719#[repr(u32)]
2720#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2721#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2722pub enum MavMountMode {
2723    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2724    MAV_MOUNT_MODE_RETRACT = 0,
2725    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2726    MAV_MOUNT_MODE_NEUTRAL = 1,
2727    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2729    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2730    MAV_MOUNT_MODE_RC_TARGETING = 3,
2731    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2732    MAV_MOUNT_MODE_GPS_POINT = 4,
2733    #[doc = "Gimbal tracks system with specified system ID"]
2734    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2735    #[doc = "Gimbal tracks home position"]
2736    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2737}
2738impl MavMountMode {
2739    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2740}
2741impl Default for MavMountMode {
2742    fn default() -> Self {
2743        Self::DEFAULT
2744    }
2745}
2746#[cfg_attr(feature = "ts", derive(TS))]
2747#[cfg_attr(feature = "ts", ts(export))]
2748#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2750#[cfg_attr(feature = "serde", serde(tag = "type"))]
2751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2752#[repr(u32)]
2753pub enum MavOdidArmStatus {
2754    #[doc = "Passing arming checks."]
2755    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2756    #[doc = "Generic arming failure, see error string for details."]
2757    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2758}
2759impl MavOdidArmStatus {
2760    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2761}
2762impl Default for MavOdidArmStatus {
2763    fn default() -> Self {
2764        Self::DEFAULT
2765    }
2766}
2767#[cfg_attr(feature = "ts", derive(TS))]
2768#[cfg_attr(feature = "ts", ts(export))]
2769#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2771#[cfg_attr(feature = "serde", serde(tag = "type"))]
2772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2773#[repr(u32)]
2774pub enum MavOdidAuthType {
2775    #[doc = "No authentication type is specified."]
2776    MAV_ODID_AUTH_TYPE_NONE = 0,
2777    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2778    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2779    #[doc = "Signature for the Operator ID."]
2780    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2781    #[doc = "Signature for the entire message set."]
2782    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2783    #[doc = "Authentication is provided by Network Remote ID."]
2784    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2785    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2786    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2787}
2788impl MavOdidAuthType {
2789    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2790}
2791impl Default for MavOdidAuthType {
2792    fn default() -> Self {
2793        Self::DEFAULT
2794    }
2795}
2796#[cfg_attr(feature = "ts", derive(TS))]
2797#[cfg_attr(feature = "ts", ts(export))]
2798#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2800#[cfg_attr(feature = "serde", serde(tag = "type"))]
2801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2802#[repr(u32)]
2803pub enum MavOdidCategoryEu {
2804    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2805    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2806    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2807    MAV_ODID_CATEGORY_EU_OPEN = 1,
2808    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2809    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2810    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2811    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2812}
2813impl MavOdidCategoryEu {
2814    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2815}
2816impl Default for MavOdidCategoryEu {
2817    fn default() -> Self {
2818        Self::DEFAULT
2819    }
2820}
2821#[cfg_attr(feature = "ts", derive(TS))]
2822#[cfg_attr(feature = "ts", ts(export))]
2823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "serde", serde(tag = "type"))]
2826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2827#[repr(u32)]
2828pub enum MavOdidClassEu {
2829    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2830    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2832    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2834    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2836    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2838    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2840    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2842    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2843    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2844    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2845}
2846impl MavOdidClassEu {
2847    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2848}
2849impl Default for MavOdidClassEu {
2850    fn default() -> Self {
2851        Self::DEFAULT
2852    }
2853}
2854#[cfg_attr(feature = "ts", derive(TS))]
2855#[cfg_attr(feature = "ts", ts(export))]
2856#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2858#[cfg_attr(feature = "serde", serde(tag = "type"))]
2859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2860#[repr(u32)]
2861pub enum MavOdidClassificationType {
2862    #[doc = "The classification type for the UA is undeclared."]
2863    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2864    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2865    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2866}
2867impl MavOdidClassificationType {
2868    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2869}
2870impl Default for MavOdidClassificationType {
2871    fn default() -> Self {
2872        Self::DEFAULT
2873    }
2874}
2875#[cfg_attr(feature = "ts", derive(TS))]
2876#[cfg_attr(feature = "ts", ts(export))]
2877#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2879#[cfg_attr(feature = "serde", serde(tag = "type"))]
2880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2881#[repr(u32)]
2882pub enum MavOdidDescType {
2883    #[doc = "Optional free-form text description of the purpose of the flight."]
2884    MAV_ODID_DESC_TYPE_TEXT = 0,
2885    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2887    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2888    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2889}
2890impl MavOdidDescType {
2891    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2892}
2893impl Default for MavOdidDescType {
2894    fn default() -> Self {
2895        Self::DEFAULT
2896    }
2897}
2898#[cfg_attr(feature = "ts", derive(TS))]
2899#[cfg_attr(feature = "ts", ts(export))]
2900#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2902#[cfg_attr(feature = "serde", serde(tag = "type"))]
2903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2904#[repr(u32)]
2905pub enum MavOdidHeightRef {
2906    #[doc = "The height field is relative to the take-off location."]
2907    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2908    #[doc = "The height field is relative to ground."]
2909    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2910}
2911impl MavOdidHeightRef {
2912    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2913}
2914impl Default for MavOdidHeightRef {
2915    fn default() -> Self {
2916        Self::DEFAULT
2917    }
2918}
2919#[cfg_attr(feature = "ts", derive(TS))]
2920#[cfg_attr(feature = "ts", ts(export))]
2921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2923#[cfg_attr(feature = "serde", serde(tag = "type"))]
2924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2925#[repr(u32)]
2926pub enum MavOdidHorAcc {
2927    #[doc = "The horizontal accuracy is unknown."]
2928    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2929    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2930    MAV_ODID_HOR_ACC_10NM = 1,
2931    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2932    MAV_ODID_HOR_ACC_4NM = 2,
2933    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2934    MAV_ODID_HOR_ACC_2NM = 3,
2935    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2936    MAV_ODID_HOR_ACC_1NM = 4,
2937    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2938    MAV_ODID_HOR_ACC_0_5NM = 5,
2939    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2940    MAV_ODID_HOR_ACC_0_3NM = 6,
2941    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2942    MAV_ODID_HOR_ACC_0_1NM = 7,
2943    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2944    MAV_ODID_HOR_ACC_0_05NM = 8,
2945    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2946    MAV_ODID_HOR_ACC_30_METER = 9,
2947    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2948    MAV_ODID_HOR_ACC_10_METER = 10,
2949    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2950    MAV_ODID_HOR_ACC_3_METER = 11,
2951    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2952    MAV_ODID_HOR_ACC_1_METER = 12,
2953}
2954impl MavOdidHorAcc {
2955    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2956}
2957impl Default for MavOdidHorAcc {
2958    fn default() -> Self {
2959        Self::DEFAULT
2960    }
2961}
2962#[cfg_attr(feature = "ts", derive(TS))]
2963#[cfg_attr(feature = "ts", ts(export))]
2964#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2966#[cfg_attr(feature = "serde", serde(tag = "type"))]
2967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2968#[repr(u32)]
2969pub enum MavOdidIdType {
2970    #[doc = "No type defined."]
2971    MAV_ODID_ID_TYPE_NONE = 0,
2972    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2973    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2974    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2975    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2976    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2977    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2978    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2979    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2980}
2981impl MavOdidIdType {
2982    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2983}
2984impl Default for MavOdidIdType {
2985    fn default() -> Self {
2986        Self::DEFAULT
2987    }
2988}
2989#[cfg_attr(feature = "ts", derive(TS))]
2990#[cfg_attr(feature = "ts", ts(export))]
2991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2993#[cfg_attr(feature = "serde", serde(tag = "type"))]
2994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2995#[repr(u32)]
2996pub enum MavOdidOperatorIdType {
2997    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2998    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2999}
3000impl MavOdidOperatorIdType {
3001    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3002}
3003impl Default for MavOdidOperatorIdType {
3004    fn default() -> Self {
3005        Self::DEFAULT
3006    }
3007}
3008#[cfg_attr(feature = "ts", derive(TS))]
3009#[cfg_attr(feature = "ts", ts(export))]
3010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3012#[cfg_attr(feature = "serde", serde(tag = "type"))]
3013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3014#[repr(u32)]
3015pub enum MavOdidOperatorLocationType {
3016    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3018    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3020    #[doc = "The location/altitude of the operator are fixed values."]
3021    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3022}
3023impl MavOdidOperatorLocationType {
3024    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3025}
3026impl Default for MavOdidOperatorLocationType {
3027    fn default() -> Self {
3028        Self::DEFAULT
3029    }
3030}
3031#[cfg_attr(feature = "ts", derive(TS))]
3032#[cfg_attr(feature = "ts", ts(export))]
3033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3035#[cfg_attr(feature = "serde", serde(tag = "type"))]
3036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3037#[repr(u32)]
3038pub enum MavOdidSpeedAcc {
3039    #[doc = "The speed accuracy is unknown."]
3040    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3041    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3042    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3043    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3044    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3045    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3046    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3047    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3048    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3049}
3050impl MavOdidSpeedAcc {
3051    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3052}
3053impl Default for MavOdidSpeedAcc {
3054    fn default() -> Self {
3055        Self::DEFAULT
3056    }
3057}
3058#[cfg_attr(feature = "ts", derive(TS))]
3059#[cfg_attr(feature = "ts", ts(export))]
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065pub enum MavOdidStatus {
3066    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3067    MAV_ODID_STATUS_UNDECLARED = 0,
3068    #[doc = "The UA is on the ground."]
3069    MAV_ODID_STATUS_GROUND = 1,
3070    #[doc = "The UA is in the air."]
3071    MAV_ODID_STATUS_AIRBORNE = 2,
3072    #[doc = "The UA is having an emergency."]
3073    MAV_ODID_STATUS_EMERGENCY = 3,
3074    #[doc = "The remote ID system is failing or unreliable in some way."]
3075    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3076}
3077impl MavOdidStatus {
3078    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3079}
3080impl Default for MavOdidStatus {
3081    fn default() -> Self {
3082        Self::DEFAULT
3083    }
3084}
3085#[cfg_attr(feature = "ts", derive(TS))]
3086#[cfg_attr(feature = "ts", ts(export))]
3087#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3089#[cfg_attr(feature = "serde", serde(tag = "type"))]
3090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3091#[repr(u32)]
3092pub enum MavOdidTimeAcc {
3093    #[doc = "The timestamp accuracy is unknown."]
3094    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3096    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3098    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3100    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3102    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3104    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3106    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3108    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3110    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3112    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3114    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3116    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3118    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3120    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3122    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3123    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3124    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3125}
3126impl MavOdidTimeAcc {
3127    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3128}
3129impl Default for MavOdidTimeAcc {
3130    fn default() -> Self {
3131        Self::DEFAULT
3132    }
3133}
3134#[cfg_attr(feature = "ts", derive(TS))]
3135#[cfg_attr(feature = "ts", ts(export))]
3136#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3138#[cfg_attr(feature = "serde", serde(tag = "type"))]
3139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3140#[repr(u32)]
3141pub enum MavOdidUaType {
3142    #[doc = "No UA (Unmanned Aircraft) type defined."]
3143    MAV_ODID_UA_TYPE_NONE = 0,
3144    #[doc = "Aeroplane/Airplane. Fixed wing."]
3145    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3146    #[doc = "Helicopter or multirotor."]
3147    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3148    #[doc = "Gyroplane."]
3149    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3150    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3151    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3152    #[doc = "Ornithopter."]
3153    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3154    #[doc = "Glider."]
3155    MAV_ODID_UA_TYPE_GLIDER = 6,
3156    #[doc = "Kite."]
3157    MAV_ODID_UA_TYPE_KITE = 7,
3158    #[doc = "Free Balloon."]
3159    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3160    #[doc = "Captive Balloon."]
3161    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3162    #[doc = "Airship. E.g. a blimp."]
3163    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3164    #[doc = "Free Fall/Parachute (unpowered)."]
3165    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3166    #[doc = "Rocket."]
3167    MAV_ODID_UA_TYPE_ROCKET = 12,
3168    #[doc = "Tethered powered aircraft."]
3169    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3170    #[doc = "Ground Obstacle."]
3171    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3172    #[doc = "Other type of aircraft not listed earlier."]
3173    MAV_ODID_UA_TYPE_OTHER = 15,
3174}
3175impl MavOdidUaType {
3176    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3177}
3178impl Default for MavOdidUaType {
3179    fn default() -> Self {
3180        Self::DEFAULT
3181    }
3182}
3183#[cfg_attr(feature = "ts", derive(TS))]
3184#[cfg_attr(feature = "ts", ts(export))]
3185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3187#[cfg_attr(feature = "serde", serde(tag = "type"))]
3188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3189#[repr(u32)]
3190pub enum MavOdidVerAcc {
3191    #[doc = "The vertical accuracy is unknown."]
3192    MAV_ODID_VER_ACC_UNKNOWN = 0,
3193    #[doc = "The vertical accuracy is smaller than 150 meter."]
3194    MAV_ODID_VER_ACC_150_METER = 1,
3195    #[doc = "The vertical accuracy is smaller than 45 meter."]
3196    MAV_ODID_VER_ACC_45_METER = 2,
3197    #[doc = "The vertical accuracy is smaller than 25 meter."]
3198    MAV_ODID_VER_ACC_25_METER = 3,
3199    #[doc = "The vertical accuracy is smaller than 10 meter."]
3200    MAV_ODID_VER_ACC_10_METER = 4,
3201    #[doc = "The vertical accuracy is smaller than 3 meter."]
3202    MAV_ODID_VER_ACC_3_METER = 5,
3203    #[doc = "The vertical accuracy is smaller than 1 meter."]
3204    MAV_ODID_VER_ACC_1_METER = 6,
3205}
3206impl MavOdidVerAcc {
3207    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3208}
3209impl Default for MavOdidVerAcc {
3210    fn default() -> Self {
3211        Self::DEFAULT
3212    }
3213}
3214#[cfg_attr(feature = "ts", derive(TS))]
3215#[cfg_attr(feature = "ts", ts(export))]
3216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3218#[cfg_attr(feature = "serde", serde(tag = "type"))]
3219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3220#[repr(u32)]
3221#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3222pub enum MavParamExtType {
3223    #[doc = "8-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3225    #[doc = "8-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT8 = 2,
3227    #[doc = "16-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3229    #[doc = "16-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT16 = 4,
3231    #[doc = "32-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3233    #[doc = "32-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT32 = 6,
3235    #[doc = "64-bit unsigned integer"]
3236    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3237    #[doc = "64-bit signed integer"]
3238    MAV_PARAM_EXT_TYPE_INT64 = 8,
3239    #[doc = "32-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3241    #[doc = "64-bit floating-point"]
3242    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3243    #[doc = "Custom Type"]
3244    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3245}
3246impl MavParamExtType {
3247    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3248}
3249impl Default for MavParamExtType {
3250    fn default() -> Self {
3251        Self::DEFAULT
3252    }
3253}
3254#[cfg_attr(feature = "ts", derive(TS))]
3255#[cfg_attr(feature = "ts", ts(export))]
3256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3258#[cfg_attr(feature = "serde", serde(tag = "type"))]
3259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3260#[repr(u32)]
3261#[doc = "Specifies the datatype of a MAVLink parameter."]
3262pub enum MavParamType {
3263    #[doc = "8-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT8 = 1,
3265    #[doc = "8-bit signed integer"]
3266    MAV_PARAM_TYPE_INT8 = 2,
3267    #[doc = "16-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT16 = 3,
3269    #[doc = "16-bit signed integer"]
3270    MAV_PARAM_TYPE_INT16 = 4,
3271    #[doc = "32-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT32 = 5,
3273    #[doc = "32-bit signed integer"]
3274    MAV_PARAM_TYPE_INT32 = 6,
3275    #[doc = "64-bit unsigned integer"]
3276    MAV_PARAM_TYPE_UINT64 = 7,
3277    #[doc = "64-bit signed integer"]
3278    MAV_PARAM_TYPE_INT64 = 8,
3279    #[doc = "32-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL32 = 9,
3281    #[doc = "64-bit floating-point"]
3282    MAV_PARAM_TYPE_REAL64 = 10,
3283}
3284impl MavParamType {
3285    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3286}
3287impl Default for MavParamType {
3288    fn default() -> Self {
3289        Self::DEFAULT
3290    }
3291}
3292bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3293impl MavPowerStatus {
3294    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3295}
3296impl Default for MavPowerStatus {
3297    fn default() -> Self {
3298        Self::DEFAULT
3299    }
3300}
3301#[cfg_attr(feature = "ts", derive(TS))]
3302#[cfg_attr(feature = "ts", ts(export))]
3303#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3305#[cfg_attr(feature = "serde", serde(tag = "type"))]
3306#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3307#[repr(u32)]
3308#[doc = "Action required when performing CMD_PREFLIGHT_STORAGE"]
3309pub enum MavPreflightStorageAction {
3310    #[doc = "Read all parameters from storage"]
3311    MAV_PFS_CMD_READ_ALL = 0,
3312    #[doc = "Write all parameters to storage"]
3313    MAV_PFS_CMD_WRITE_ALL = 1,
3314    #[doc = "Clear all  parameters in storage"]
3315    MAV_PFS_CMD_CLEAR_ALL = 2,
3316    #[doc = "Read specific parameters from storage"]
3317    MAV_PFS_CMD_READ_SPECIFIC = 3,
3318    #[doc = "Write specific parameters to storage"]
3319    MAV_PFS_CMD_WRITE_SPECIFIC = 4,
3320    #[doc = "Clear specific parameters in storage"]
3321    MAV_PFS_CMD_CLEAR_SPECIFIC = 5,
3322    #[doc = "do nothing"]
3323    MAV_PFS_CMD_DO_NOTHING = 6,
3324}
3325impl MavPreflightStorageAction {
3326    pub const DEFAULT: Self = Self::MAV_PFS_CMD_READ_ALL;
3327}
3328impl Default for MavPreflightStorageAction {
3329    fn default() -> Self {
3330        Self::DEFAULT
3331    }
3332}
3333bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3334impl MavProtocolCapability {
3335    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3336}
3337impl Default for MavProtocolCapability {
3338    fn default() -> Self {
3339        Self::DEFAULT
3340    }
3341}
3342#[cfg_attr(feature = "ts", derive(TS))]
3343#[cfg_attr(feature = "ts", ts(export))]
3344#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3346#[cfg_attr(feature = "serde", serde(tag = "type"))]
3347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3348#[repr(u32)]
3349#[doc = "Result from a MAVLink command (MAV_CMD)"]
3350pub enum MavResult {
3351    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3352    MAV_RESULT_ACCEPTED = 0,
3353    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3354    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3355    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3356    MAV_RESULT_DENIED = 2,
3357    #[doc = "Command is not supported (unknown)."]
3358    MAV_RESULT_UNSUPPORTED = 3,
3359    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3360    MAV_RESULT_FAILED = 4,
3361    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3362    MAV_RESULT_IN_PROGRESS = 5,
3363    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3364    MAV_RESULT_CANCELLED = 6,
3365    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3366    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3367    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3368    MAV_RESULT_COMMAND_INT_ONLY = 8,
3369    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3370    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3371}
3372impl MavResult {
3373    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3374}
3375impl Default for MavResult {
3376    fn default() -> Self {
3377        Self::DEFAULT
3378    }
3379}
3380#[cfg_attr(feature = "ts", derive(TS))]
3381#[cfg_attr(feature = "ts", ts(export))]
3382#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3384#[cfg_attr(feature = "serde", serde(tag = "type"))]
3385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3386#[repr(u32)]
3387#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3388#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3389pub enum MavRoi {
3390    #[doc = "No region of interest."]
3391    MAV_ROI_NONE = 0,
3392    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3393    MAV_ROI_WPNEXT = 1,
3394    #[doc = "Point toward given waypoint."]
3395    MAV_ROI_WPINDEX = 2,
3396    #[doc = "Point toward fixed location."]
3397    MAV_ROI_LOCATION = 3,
3398    #[doc = "Point toward of given id."]
3399    MAV_ROI_TARGET = 4,
3400}
3401impl MavRoi {
3402    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3403}
3404impl Default for MavRoi {
3405    fn default() -> Self {
3406        Self::DEFAULT
3407    }
3408}
3409#[cfg_attr(feature = "ts", derive(TS))]
3410#[cfg_attr(feature = "ts", ts(export))]
3411#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3413#[cfg_attr(feature = "serde", serde(tag = "type"))]
3414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3415#[repr(u32)]
3416#[doc = "Enumeration of sensor orientation, according to its rotations"]
3417pub enum MavSensorOrientation {
3418    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3419    MAV_SENSOR_ROTATION_NONE = 0,
3420    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3421    MAV_SENSOR_ROTATION_YAW_45 = 1,
3422    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3423    MAV_SENSOR_ROTATION_YAW_90 = 2,
3424    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3425    MAV_SENSOR_ROTATION_YAW_135 = 3,
3426    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3427    MAV_SENSOR_ROTATION_YAW_180 = 4,
3428    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3429    MAV_SENSOR_ROTATION_YAW_225 = 5,
3430    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3431    MAV_SENSOR_ROTATION_YAW_270 = 6,
3432    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3433    MAV_SENSOR_ROTATION_YAW_315 = 7,
3434    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3436    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3437    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3438    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3439    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3440    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3441    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3442    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3444    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3445    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3446    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3447    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3448    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3449    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3450    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3452    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3453    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3454    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3458    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3459    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3460    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3461    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3462    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3463    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3464    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3465    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3466    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3467    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3468    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3469    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3470    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3471    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3472    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3473    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3474    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3475    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3476    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3477    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3478    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3479    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3480    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3481    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3482    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3483    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3484    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3485    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3486    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3487    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3488    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3489    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3490    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3491    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3492    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3493    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3494    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3495    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3496    #[doc = "Pitch: 315"]
3497    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3498    #[doc = "Roll: 90, Pitch: 315"]
3499    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3500    #[doc = "Custom orientation"]
3501    MAV_SENSOR_ROTATION_CUSTOM = 100,
3502}
3503impl MavSensorOrientation {
3504    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3505}
3506impl Default for MavSensorOrientation {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3519pub enum MavSeverity {
3520    #[doc = "System is unusable. This is a \"panic\" condition."]
3521    MAV_SEVERITY_EMERGENCY = 0,
3522    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3523    MAV_SEVERITY_ALERT = 1,
3524    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3525    MAV_SEVERITY_CRITICAL = 2,
3526    #[doc = "Indicates an error in secondary/redundant systems."]
3527    MAV_SEVERITY_ERROR = 3,
3528    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3529    MAV_SEVERITY_WARNING = 4,
3530    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3531    MAV_SEVERITY_NOTICE = 5,
3532    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3533    MAV_SEVERITY_INFO = 6,
3534    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3535    MAV_SEVERITY_DEBUG = 7,
3536}
3537impl MavSeverity {
3538    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3539}
3540impl Default for MavSeverity {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3553pub enum MavStandardMode {
3554    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3555    MAV_STANDARD_MODE_NON_STANDARD = 0,
3556    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3557    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3558    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3559    MAV_STANDARD_MODE_ORBIT = 2,
3560    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3561    MAV_STANDARD_MODE_CRUISE = 3,
3562    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3563    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3564    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3565    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3566    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3567    MAV_STANDARD_MODE_MISSION = 6,
3568    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3569    MAV_STANDARD_MODE_LAND = 7,
3570    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3571    MAV_STANDARD_MODE_TAKEOFF = 8,
3572}
3573impl MavStandardMode {
3574    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3575}
3576impl Default for MavStandardMode {
3577    fn default() -> Self {
3578        Self::DEFAULT
3579    }
3580}
3581#[cfg_attr(feature = "ts", derive(TS))]
3582#[cfg_attr(feature = "ts", ts(export))]
3583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3585#[cfg_attr(feature = "serde", serde(tag = "type"))]
3586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3587#[repr(u32)]
3588pub enum MavState {
3589    #[doc = "Uninitialized system, state is unknown."]
3590    MAV_STATE_UNINIT = 0,
3591    #[doc = "System is booting up."]
3592    MAV_STATE_BOOT = 1,
3593    #[doc = "System is calibrating and not flight-ready."]
3594    MAV_STATE_CALIBRATING = 2,
3595    #[doc = "System is grounded and on standby. It can be launched any time."]
3596    MAV_STATE_STANDBY = 3,
3597    #[doc = "System is active and might be already airborne. Motors are engaged."]
3598    MAV_STATE_ACTIVE = 4,
3599    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3600    MAV_STATE_CRITICAL = 5,
3601    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3602    MAV_STATE_EMERGENCY = 6,
3603    #[doc = "System just initialized its power-down sequence, will shut down now."]
3604    MAV_STATE_POWEROFF = 7,
3605    #[doc = "System is terminating itself (failsafe or commanded)."]
3606    MAV_STATE_FLIGHT_TERMINATION = 8,
3607}
3608impl MavState {
3609    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3610}
3611impl Default for MavState {
3612    fn default() -> Self {
3613        Self::DEFAULT
3614    }
3615}
3616bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3617impl MavSysStatusSensor {
3618    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3619}
3620impl Default for MavSysStatusSensor {
3621    fn default() -> Self {
3622        Self::DEFAULT
3623    }
3624}
3625bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3626impl MavSysStatusSensorExtended {
3627    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3628}
3629impl Default for MavSysStatusSensorExtended {
3630    fn default() -> Self {
3631        Self::DEFAULT
3632    }
3633}
3634#[cfg_attr(feature = "ts", derive(TS))]
3635#[cfg_attr(feature = "ts", ts(export))]
3636#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3638#[cfg_attr(feature = "serde", serde(tag = "type"))]
3639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3640#[repr(u32)]
3641pub enum MavTunnelPayloadType {
3642    #[doc = "Encoding of payload unknown."]
3643    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3644    #[doc = "Registered for STorM32 gimbal controller."]
3645    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3646    #[doc = "Registered for STorM32 gimbal controller."]
3647    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3648    #[doc = "Registered for STorM32 gimbal controller."]
3649    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3650    #[doc = "Registered for STorM32 gimbal controller."]
3651    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3652    #[doc = "Registered for STorM32 gimbal controller."]
3653    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3654    #[doc = "Registered for STorM32 gimbal controller."]
3655    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3656    #[doc = "Registered for STorM32 gimbal controller."]
3657    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3658    #[doc = "Registered for STorM32 gimbal controller."]
3659    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3660    #[doc = "Registered for STorM32 gimbal controller."]
3661    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3662    #[doc = "Registered for STorM32 gimbal controller."]
3663    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3664    #[doc = "Registered for ModalAI remote OSD protocol."]
3665    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3666    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3667    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3668    #[doc = "Registered for ModalAI vendor use."]
3669    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3670}
3671impl MavTunnelPayloadType {
3672    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3673}
3674impl Default for MavTunnelPayloadType {
3675    fn default() -> Self {
3676        Self::DEFAULT
3677    }
3678}
3679#[cfg_attr(feature = "ts", derive(TS))]
3680#[cfg_attr(feature = "ts", ts(export))]
3681#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3683#[cfg_attr(feature = "serde", serde(tag = "type"))]
3684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3685#[repr(u32)]
3686#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3687pub enum MavType {
3688    #[doc = "Generic micro air vehicle"]
3689    MAV_TYPE_GENERIC = 0,
3690    #[doc = "Fixed wing aircraft."]
3691    MAV_TYPE_FIXED_WING = 1,
3692    #[doc = "Quadrotor"]
3693    MAV_TYPE_QUADROTOR = 2,
3694    #[doc = "Coaxial helicopter"]
3695    MAV_TYPE_COAXIAL = 3,
3696    #[doc = "Normal helicopter with tail rotor."]
3697    MAV_TYPE_HELICOPTER = 4,
3698    #[doc = "Ground installation"]
3699    MAV_TYPE_ANTENNA_TRACKER = 5,
3700    #[doc = "Operator control unit / ground control station"]
3701    MAV_TYPE_GCS = 6,
3702    #[doc = "Airship, controlled"]
3703    MAV_TYPE_AIRSHIP = 7,
3704    #[doc = "Free balloon, uncontrolled"]
3705    MAV_TYPE_FREE_BALLOON = 8,
3706    #[doc = "Rocket"]
3707    MAV_TYPE_ROCKET = 9,
3708    #[doc = "Ground rover"]
3709    MAV_TYPE_GROUND_ROVER = 10,
3710    #[doc = "Surface vessel, boat, ship"]
3711    MAV_TYPE_SURFACE_BOAT = 11,
3712    #[doc = "Submarine"]
3713    MAV_TYPE_SUBMARINE = 12,
3714    #[doc = "Hexarotor"]
3715    MAV_TYPE_HEXAROTOR = 13,
3716    #[doc = "Octorotor"]
3717    MAV_TYPE_OCTOROTOR = 14,
3718    #[doc = "Tricopter"]
3719    MAV_TYPE_TRICOPTER = 15,
3720    #[doc = "Flapping wing"]
3721    MAV_TYPE_FLAPPING_WING = 16,
3722    #[doc = "Kite"]
3723    MAV_TYPE_KITE = 17,
3724    #[doc = "Onboard companion controller"]
3725    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3726    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3727    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3728    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3729    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3730    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3731    MAV_TYPE_VTOL_TILTROTOR = 21,
3732    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3733    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3734    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3735    MAV_TYPE_VTOL_TAILSITTER = 23,
3736    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3737    MAV_TYPE_VTOL_TILTWING = 24,
3738    #[doc = "VTOL reserved 5"]
3739    MAV_TYPE_VTOL_RESERVED5 = 25,
3740    #[doc = "Gimbal"]
3741    MAV_TYPE_GIMBAL = 26,
3742    #[doc = "ADSB system"]
3743    MAV_TYPE_ADSB = 27,
3744    #[doc = "Steerable, nonrigid airfoil"]
3745    MAV_TYPE_PARAFOIL = 28,
3746    #[doc = "Dodecarotor"]
3747    MAV_TYPE_DODECAROTOR = 29,
3748    #[doc = "Camera"]
3749    MAV_TYPE_CAMERA = 30,
3750    #[doc = "Charging station"]
3751    MAV_TYPE_CHARGING_STATION = 31,
3752    #[doc = "FLARM collision avoidance system"]
3753    MAV_TYPE_FLARM = 32,
3754    #[doc = "Servo"]
3755    MAV_TYPE_SERVO = 33,
3756    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3757    MAV_TYPE_ODID = 34,
3758    #[doc = "Decarotor"]
3759    MAV_TYPE_DECAROTOR = 35,
3760    #[doc = "Battery"]
3761    MAV_TYPE_BATTERY = 36,
3762    #[doc = "Parachute"]
3763    MAV_TYPE_PARACHUTE = 37,
3764    #[doc = "Log"]
3765    MAV_TYPE_LOG = 38,
3766    #[doc = "OSD"]
3767    MAV_TYPE_OSD = 39,
3768    #[doc = "IMU"]
3769    MAV_TYPE_IMU = 40,
3770    #[doc = "GPS"]
3771    MAV_TYPE_GPS = 41,
3772    #[doc = "Winch"]
3773    MAV_TYPE_WINCH = 42,
3774    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3775    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3776    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3777    MAV_TYPE_ILLUMINATOR = 44,
3778    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3779    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3780}
3781impl MavType {
3782    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3783}
3784impl Default for MavType {
3785    fn default() -> Self {
3786        Self::DEFAULT
3787    }
3788}
3789#[cfg_attr(feature = "ts", derive(TS))]
3790#[cfg_attr(feature = "ts", ts(export))]
3791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3793#[cfg_attr(feature = "serde", serde(tag = "type"))]
3794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3795#[repr(u32)]
3796#[doc = "Enumeration of VTOL states"]
3797pub enum MavVtolState {
3798    #[doc = "MAV is not configured as VTOL"]
3799    MAV_VTOL_STATE_UNDEFINED = 0,
3800    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3801    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3802    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3803    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3804    #[doc = "VTOL is in multicopter state"]
3805    MAV_VTOL_STATE_MC = 3,
3806    #[doc = "VTOL is in fixed-wing state"]
3807    MAV_VTOL_STATE_FW = 4,
3808}
3809impl MavVtolState {
3810    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3811}
3812impl Default for MavVtolState {
3813    fn default() -> Self {
3814        Self::DEFAULT
3815    }
3816}
3817bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3818impl MavWinchStatusFlag {
3819    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3820}
3821impl Default for MavWinchStatusFlag {
3822    fn default() -> Self {
3823        Self::DEFAULT
3824    }
3825}
3826#[cfg_attr(feature = "ts", derive(TS))]
3827#[cfg_attr(feature = "ts", ts(export))]
3828#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3830#[cfg_attr(feature = "serde", serde(tag = "type"))]
3831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3832#[repr(u32)]
3833pub enum MavlinkDataStreamType {
3834    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3835    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3836    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3837    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3838    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3839    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3840}
3841impl MavlinkDataStreamType {
3842    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3843}
3844impl Default for MavlinkDataStreamType {
3845    fn default() -> Self {
3846        Self::DEFAULT
3847    }
3848}
3849#[cfg_attr(feature = "ts", derive(TS))]
3850#[cfg_attr(feature = "ts", ts(export))]
3851#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3853#[cfg_attr(feature = "serde", serde(tag = "type"))]
3854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3855#[repr(u32)]
3856#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3857pub enum MissionState {
3858    #[doc = "The mission status reporting is not supported."]
3859    MISSION_STATE_UNKNOWN = 0,
3860    #[doc = "No mission on the vehicle."]
3861    MISSION_STATE_NO_MISSION = 1,
3862    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3863    MISSION_STATE_NOT_STARTED = 2,
3864    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3865    MISSION_STATE_ACTIVE = 3,
3866    #[doc = "Mission is paused when in auto mode."]
3867    MISSION_STATE_PAUSED = 4,
3868    #[doc = "Mission has executed all mission items."]
3869    MISSION_STATE_COMPLETE = 5,
3870}
3871impl MissionState {
3872    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3873}
3874impl Default for MissionState {
3875    fn default() -> Self {
3876        Self::DEFAULT
3877    }
3878}
3879#[cfg_attr(feature = "ts", derive(TS))]
3880#[cfg_attr(feature = "ts", ts(export))]
3881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3883#[cfg_attr(feature = "serde", serde(tag = "type"))]
3884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3885#[repr(u32)]
3886#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3887pub enum MotorTestOrder {
3888    #[doc = "Default autopilot motor test method."]
3889    MOTOR_TEST_ORDER_DEFAULT = 0,
3890    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3891    MOTOR_TEST_ORDER_SEQUENCE = 1,
3892    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3893    MOTOR_TEST_ORDER_BOARD = 2,
3894}
3895impl MotorTestOrder {
3896    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3897}
3898impl Default for MotorTestOrder {
3899    fn default() -> Self {
3900        Self::DEFAULT
3901    }
3902}
3903#[cfg_attr(feature = "ts", derive(TS))]
3904#[cfg_attr(feature = "ts", ts(export))]
3905#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3907#[cfg_attr(feature = "serde", serde(tag = "type"))]
3908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3909#[repr(u32)]
3910#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3911pub enum MotorTestThrottleType {
3912    #[doc = "Throttle as a percentage (0 ~ 100)"]
3913    MOTOR_TEST_THROTTLE_PERCENT = 0,
3914    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3915    MOTOR_TEST_THROTTLE_PWM = 1,
3916    #[doc = "Throttle pass-through from pilot's transmitter."]
3917    MOTOR_TEST_THROTTLE_PILOT = 2,
3918    #[doc = "Per-motor compass calibration test."]
3919    MOTOR_TEST_COMPASS_CAL = 3,
3920}
3921impl MotorTestThrottleType {
3922    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3923}
3924impl Default for MotorTestThrottleType {
3925    fn default() -> Self {
3926        Self::DEFAULT
3927    }
3928}
3929#[cfg_attr(feature = "ts", derive(TS))]
3930#[cfg_attr(feature = "ts", ts(export))]
3931#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3933#[cfg_attr(feature = "serde", serde(tag = "type"))]
3934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3935#[repr(u32)]
3936pub enum NavVtolLandOptions {
3937    #[doc = "Default autopilot landing behaviour."]
3938    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3939    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3940    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3941    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3942    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3943}
3944impl NavVtolLandOptions {
3945    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3946}
3947impl Default for NavVtolLandOptions {
3948    fn default() -> Self {
3949        Self::DEFAULT
3950    }
3951}
3952#[cfg_attr(feature = "ts", derive(TS))]
3953#[cfg_attr(feature = "ts", ts(export))]
3954#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3956#[cfg_attr(feature = "serde", serde(tag = "type"))]
3957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3958#[repr(u32)]
3959#[doc = "Yaw behaviour during orbit flight."]
3960pub enum OrbitYawBehaviour {
3961    #[doc = "Vehicle front points to the center (default)."]
3962    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3963    #[doc = "Vehicle front holds heading when message received."]
3964    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3965    #[doc = "Yaw uncontrolled."]
3966    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3967    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3968    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3969    #[doc = "Yaw controlled by RC input."]
3970    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3971    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3972    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3973}
3974impl OrbitYawBehaviour {
3975    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3976}
3977impl Default for OrbitYawBehaviour {
3978    fn default() -> Self {
3979        Self::DEFAULT
3980    }
3981}
3982#[cfg_attr(feature = "ts", derive(TS))]
3983#[cfg_attr(feature = "ts", ts(export))]
3984#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3986#[cfg_attr(feature = "serde", serde(tag = "type"))]
3987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3988#[repr(u32)]
3989#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3990pub enum ParachuteAction {
3991    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3992    PARACHUTE_DISABLE = 0,
3993    #[doc = "Enable auto-release of parachute."]
3994    PARACHUTE_ENABLE = 1,
3995    #[doc = "Release parachute and kill motors."]
3996    PARACHUTE_RELEASE = 2,
3997}
3998impl ParachuteAction {
3999    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4000}
4001impl Default for ParachuteAction {
4002    fn default() -> Self {
4003        Self::DEFAULT
4004    }
4005}
4006#[cfg_attr(feature = "ts", derive(TS))]
4007#[cfg_attr(feature = "ts", ts(export))]
4008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4010#[cfg_attr(feature = "serde", serde(tag = "type"))]
4011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4012#[repr(u32)]
4013#[doc = "Result from PARAM_EXT_SET message."]
4014pub enum ParamAck {
4015    #[doc = "Parameter value ACCEPTED and SET"]
4016    PARAM_ACK_ACCEPTED = 0,
4017    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4018    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4019    #[doc = "Parameter failed to set"]
4020    PARAM_ACK_FAILED = 2,
4021    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4022    PARAM_ACK_IN_PROGRESS = 3,
4023}
4024impl ParamAck {
4025    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4026}
4027impl Default for ParamAck {
4028    fn default() -> Self {
4029        Self::DEFAULT
4030    }
4031}
4032bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4033impl PositionTargetTypemask {
4034    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4035}
4036impl Default for PositionTargetTypemask {
4037    fn default() -> Self {
4038        Self::DEFAULT
4039    }
4040}
4041#[cfg_attr(feature = "ts", derive(TS))]
4042#[cfg_attr(feature = "ts", ts(export))]
4043#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4045#[cfg_attr(feature = "serde", serde(tag = "type"))]
4046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4047#[repr(u32)]
4048#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4049pub enum PrecisionLandMode {
4050    #[doc = "Normal (non-precision) landing."]
4051    PRECISION_LAND_MODE_DISABLED = 0,
4052    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4053    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4054    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4055    PRECISION_LAND_MODE_REQUIRED = 2,
4056}
4057impl PrecisionLandMode {
4058    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4059}
4060impl Default for PrecisionLandMode {
4061    fn default() -> Self {
4062        Self::DEFAULT
4063    }
4064}
4065#[cfg_attr(feature = "ts", derive(TS))]
4066#[cfg_attr(feature = "ts", ts(export))]
4067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4069#[cfg_attr(feature = "serde", serde(tag = "type"))]
4070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4071#[repr(u32)]
4072#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4073pub enum PreflightStorageMissionAction {
4074    #[doc = "Read current mission data from persistent storage"]
4075    MISSION_READ_PERSISTENT = 0,
4076    #[doc = "Write current mission data to persistent storage"]
4077    MISSION_WRITE_PERSISTENT = 1,
4078    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4079    MISSION_RESET_DEFAULT = 2,
4080}
4081impl PreflightStorageMissionAction {
4082    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4083}
4084impl Default for PreflightStorageMissionAction {
4085    fn default() -> Self {
4086        Self::DEFAULT
4087    }
4088}
4089#[cfg_attr(feature = "ts", derive(TS))]
4090#[cfg_attr(feature = "ts", ts(export))]
4091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4093#[cfg_attr(feature = "serde", serde(tag = "type"))]
4094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4095#[repr(u32)]
4096#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4097pub enum PreflightStorageParameterAction {
4098    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4099    PARAM_READ_PERSISTENT = 0,
4100    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4101    PARAM_WRITE_PERSISTENT = 1,
4102    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4103    PARAM_RESET_CONFIG_DEFAULT = 2,
4104    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4105    PARAM_RESET_SENSOR_DEFAULT = 3,
4106    #[doc = "Reset all parameters, including operation counters, to default values"]
4107    PARAM_RESET_ALL_DEFAULT = 4,
4108}
4109impl PreflightStorageParameterAction {
4110    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4111}
4112impl Default for PreflightStorageParameterAction {
4113    fn default() -> Self {
4114        Self::DEFAULT
4115    }
4116}
4117#[cfg_attr(feature = "ts", derive(TS))]
4118#[cfg_attr(feature = "ts", ts(export))]
4119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4121#[cfg_attr(feature = "serde", serde(tag = "type"))]
4122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4123#[repr(u32)]
4124#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4125pub enum RcSubType {
4126    #[doc = "Spektrum DSM2"]
4127    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4128    #[doc = "Spektrum DSMX"]
4129    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4130    #[doc = "Spektrum DSMX8"]
4131    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4132}
4133impl RcSubType {
4134    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4135}
4136impl Default for RcSubType {
4137    fn default() -> Self {
4138        Self::DEFAULT
4139    }
4140}
4141#[cfg_attr(feature = "ts", derive(TS))]
4142#[cfg_attr(feature = "ts", ts(export))]
4143#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4145#[cfg_attr(feature = "serde", serde(tag = "type"))]
4146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4147#[repr(u32)]
4148#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4149pub enum RcType {
4150    #[doc = "Spektrum"]
4151    RC_TYPE_SPEKTRUM = 0,
4152    #[doc = "CRSF"]
4153    RC_TYPE_CRSF = 1,
4154}
4155impl RcType {
4156    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4157}
4158impl Default for RcType {
4159    fn default() -> Self {
4160        Self::DEFAULT
4161    }
4162}
4163#[cfg_attr(feature = "ts", derive(TS))]
4164#[cfg_attr(feature = "ts", ts(export))]
4165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4167#[cfg_attr(feature = "serde", serde(tag = "type"))]
4168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4169#[repr(u32)]
4170#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4171pub enum RebootShutdownConditions {
4172    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4173    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4174    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4175    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4176}
4177impl RebootShutdownConditions {
4178    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4179}
4180impl Default for RebootShutdownConditions {
4181    fn default() -> Self {
4182        Self::DEFAULT
4183    }
4184}
4185#[cfg_attr(feature = "ts", derive(TS))]
4186#[cfg_attr(feature = "ts", ts(export))]
4187#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4189#[cfg_attr(feature = "serde", serde(tag = "type"))]
4190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4191#[repr(u32)]
4192#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4193pub enum RtkBaselineCoordinateSystem {
4194    #[doc = "Earth-centered, Earth-fixed"]
4195    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4196    #[doc = "RTK basestation centered, north, east, down"]
4197    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4198}
4199impl RtkBaselineCoordinateSystem {
4200    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4201}
4202impl Default for RtkBaselineCoordinateSystem {
4203    fn default() -> Self {
4204        Self::DEFAULT
4205    }
4206}
4207#[cfg_attr(feature = "ts", derive(TS))]
4208#[cfg_attr(feature = "ts", ts(export))]
4209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4211#[cfg_attr(feature = "serde", serde(tag = "type"))]
4212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4213#[repr(u32)]
4214#[doc = "Possible safety switch states."]
4215pub enum SafetySwitchState {
4216    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4217    SAFETY_SWITCH_STATE_SAFE = 0,
4218    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4219    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4220}
4221impl SafetySwitchState {
4222    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4223}
4224impl Default for SafetySwitchState {
4225    fn default() -> Self {
4226        Self::DEFAULT
4227    }
4228}
4229#[cfg_attr(feature = "ts", derive(TS))]
4230#[cfg_attr(feature = "ts", ts(export))]
4231#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4233#[cfg_attr(feature = "serde", serde(tag = "type"))]
4234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4235#[repr(u32)]
4236#[doc = "SERIAL_CONTROL device types"]
4237pub enum SerialControlDev {
4238    #[doc = "First telemetry port"]
4239    SERIAL_CONTROL_DEV_TELEM1 = 0,
4240    #[doc = "Second telemetry port"]
4241    SERIAL_CONTROL_DEV_TELEM2 = 1,
4242    #[doc = "First GPS port"]
4243    SERIAL_CONTROL_DEV_GPS1 = 2,
4244    #[doc = "Second GPS port"]
4245    SERIAL_CONTROL_DEV_GPS2 = 3,
4246    #[doc = "system shell"]
4247    SERIAL_CONTROL_DEV_SHELL = 10,
4248    #[doc = "SERIAL0"]
4249    SERIAL_CONTROL_SERIAL0 = 100,
4250    #[doc = "SERIAL1"]
4251    SERIAL_CONTROL_SERIAL1 = 101,
4252    #[doc = "SERIAL2"]
4253    SERIAL_CONTROL_SERIAL2 = 102,
4254    #[doc = "SERIAL3"]
4255    SERIAL_CONTROL_SERIAL3 = 103,
4256    #[doc = "SERIAL4"]
4257    SERIAL_CONTROL_SERIAL4 = 104,
4258    #[doc = "SERIAL5"]
4259    SERIAL_CONTROL_SERIAL5 = 105,
4260    #[doc = "SERIAL6"]
4261    SERIAL_CONTROL_SERIAL6 = 106,
4262    #[doc = "SERIAL7"]
4263    SERIAL_CONTROL_SERIAL7 = 107,
4264    #[doc = "SERIAL8"]
4265    SERIAL_CONTROL_SERIAL8 = 108,
4266    #[doc = "SERIAL9"]
4267    SERIAL_CONTROL_SERIAL9 = 109,
4268}
4269impl SerialControlDev {
4270    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4271}
4272impl Default for SerialControlDev {
4273    fn default() -> Self {
4274        Self::DEFAULT
4275    }
4276}
4277bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4278impl SerialControlFlag {
4279    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4280}
4281impl Default for SerialControlFlag {
4282    fn default() -> Self {
4283        Self::DEFAULT
4284    }
4285}
4286#[cfg_attr(feature = "ts", derive(TS))]
4287#[cfg_attr(feature = "ts", ts(export))]
4288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4290#[cfg_attr(feature = "serde", serde(tag = "type"))]
4291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4292#[repr(u32)]
4293#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4294pub enum SetFocusType {
4295    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4296    FOCUS_TYPE_STEP = 0,
4297    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4298    FOCUS_TYPE_CONTINUOUS = 1,
4299    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4300    FOCUS_TYPE_RANGE = 2,
4301    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4302    FOCUS_TYPE_METERS = 3,
4303    #[doc = "Focus automatically."]
4304    FOCUS_TYPE_AUTO = 4,
4305    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4306    FOCUS_TYPE_AUTO_SINGLE = 5,
4307    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4308    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4309}
4310impl SetFocusType {
4311    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4312}
4313impl Default for SetFocusType {
4314    fn default() -> Self {
4315        Self::DEFAULT
4316    }
4317}
4318#[cfg_attr(feature = "ts", derive(TS))]
4319#[cfg_attr(feature = "ts", ts(export))]
4320#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4322#[cfg_attr(feature = "serde", serde(tag = "type"))]
4323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4324#[repr(u32)]
4325#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4326pub enum SpeedType {
4327    #[doc = "Airspeed"]
4328    SPEED_TYPE_AIRSPEED = 0,
4329    #[doc = "Groundspeed"]
4330    SPEED_TYPE_GROUNDSPEED = 1,
4331    #[doc = "Climb speed"]
4332    SPEED_TYPE_CLIMB_SPEED = 2,
4333    #[doc = "Descent speed"]
4334    SPEED_TYPE_DESCENT_SPEED = 3,
4335}
4336impl SpeedType {
4337    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4338}
4339impl Default for SpeedType {
4340    fn default() -> Self {
4341        Self::DEFAULT
4342    }
4343}
4344#[cfg_attr(feature = "ts", derive(TS))]
4345#[cfg_attr(feature = "ts", ts(export))]
4346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4348#[cfg_attr(feature = "serde", serde(tag = "type"))]
4349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4350#[repr(u32)]
4351#[doc = "Flags to indicate the status of camera storage."]
4352pub enum StorageStatus {
4353    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4354    STORAGE_STATUS_EMPTY = 0,
4355    #[doc = "Storage present but unformatted."]
4356    STORAGE_STATUS_UNFORMATTED = 1,
4357    #[doc = "Storage present and ready."]
4358    STORAGE_STATUS_READY = 2,
4359    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4360    STORAGE_STATUS_NOT_SUPPORTED = 3,
4361}
4362impl StorageStatus {
4363    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4364}
4365impl Default for StorageStatus {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370#[cfg_attr(feature = "ts", derive(TS))]
4371#[cfg_attr(feature = "ts", ts(export))]
4372#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4374#[cfg_attr(feature = "serde", serde(tag = "type"))]
4375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4376#[repr(u32)]
4377#[doc = "Flags to indicate the type of storage."]
4378pub enum StorageType {
4379    #[doc = "Storage type is not known."]
4380    STORAGE_TYPE_UNKNOWN = 0,
4381    #[doc = "Storage type is USB device."]
4382    STORAGE_TYPE_USB_STICK = 1,
4383    #[doc = "Storage type is SD card."]
4384    STORAGE_TYPE_SD = 2,
4385    #[doc = "Storage type is microSD card."]
4386    STORAGE_TYPE_MICROSD = 3,
4387    #[doc = "Storage type is CFast."]
4388    STORAGE_TYPE_CF = 4,
4389    #[doc = "Storage type is CFexpress."]
4390    STORAGE_TYPE_CFE = 5,
4391    #[doc = "Storage type is XQD."]
4392    STORAGE_TYPE_XQD = 6,
4393    #[doc = "Storage type is HD mass storage type."]
4394    STORAGE_TYPE_HD = 7,
4395    #[doc = "Storage type is other, not listed type."]
4396    STORAGE_TYPE_OTHER = 254,
4397}
4398impl StorageType {
4399    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4400}
4401impl Default for StorageType {
4402    fn default() -> Self {
4403        Self::DEFAULT
4404    }
4405}
4406bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4407impl StorageUsageFlag {
4408    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4409}
4410impl Default for StorageUsageFlag {
4411    fn default() -> Self {
4412        Self::DEFAULT
4413    }
4414}
4415#[cfg_attr(feature = "ts", derive(TS))]
4416#[cfg_attr(feature = "ts", ts(export))]
4417#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4419#[cfg_attr(feature = "serde", serde(tag = "type"))]
4420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4421#[repr(u32)]
4422#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4423pub enum TuneFormat {
4424    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4425    TUNE_FORMAT_QBASIC1_1 = 1,
4426    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4427    TUNE_FORMAT_MML_MODERN = 2,
4428}
4429impl TuneFormat {
4430    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4431}
4432impl Default for TuneFormat {
4433    fn default() -> Self {
4434        Self::DEFAULT
4435    }
4436}
4437#[cfg_attr(feature = "ts", derive(TS))]
4438#[cfg_attr(feature = "ts", ts(export))]
4439#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4441#[cfg_attr(feature = "serde", serde(tag = "type"))]
4442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4443#[repr(u32)]
4444#[doc = "Generalized UAVCAN node health"]
4445pub enum UavcanNodeHealth {
4446    #[doc = "The node is functioning properly."]
4447    UAVCAN_NODE_HEALTH_OK = 0,
4448    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4449    UAVCAN_NODE_HEALTH_WARNING = 1,
4450    #[doc = "The node has encountered a major failure."]
4451    UAVCAN_NODE_HEALTH_ERROR = 2,
4452    #[doc = "The node has suffered a fatal malfunction."]
4453    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4454}
4455impl UavcanNodeHealth {
4456    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4457}
4458impl Default for UavcanNodeHealth {
4459    fn default() -> Self {
4460        Self::DEFAULT
4461    }
4462}
4463#[cfg_attr(feature = "ts", derive(TS))]
4464#[cfg_attr(feature = "ts", ts(export))]
4465#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4467#[cfg_attr(feature = "serde", serde(tag = "type"))]
4468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4469#[repr(u32)]
4470#[doc = "Generalized UAVCAN node mode"]
4471pub enum UavcanNodeMode {
4472    #[doc = "The node is performing its primary functions."]
4473    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4474    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4475    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4476    #[doc = "The node is under maintenance."]
4477    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4478    #[doc = "The node is in the process of updating its software."]
4479    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4480    #[doc = "The node is no longer available online."]
4481    UAVCAN_NODE_MODE_OFFLINE = 7,
4482}
4483impl UavcanNodeMode {
4484    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4485}
4486impl Default for UavcanNodeMode {
4487    fn default() -> Self {
4488        Self::DEFAULT
4489    }
4490}
4491bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4492impl UtmDataAvailFlags {
4493    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4494}
4495impl Default for UtmDataAvailFlags {
4496    fn default() -> Self {
4497        Self::DEFAULT
4498    }
4499}
4500#[cfg_attr(feature = "ts", derive(TS))]
4501#[cfg_attr(feature = "ts", ts(export))]
4502#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4504#[cfg_attr(feature = "serde", serde(tag = "type"))]
4505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4506#[repr(u32)]
4507#[doc = "Airborne status of UAS."]
4508pub enum UtmFlightState {
4509    #[doc = "The flight state can't be determined."]
4510    UTM_FLIGHT_STATE_UNKNOWN = 1,
4511    #[doc = "UAS on ground."]
4512    UTM_FLIGHT_STATE_GROUND = 2,
4513    #[doc = "UAS airborne."]
4514    UTM_FLIGHT_STATE_AIRBORNE = 3,
4515    #[doc = "UAS is in an emergency flight state."]
4516    UTM_FLIGHT_STATE_EMERGENCY = 16,
4517    #[doc = "UAS has no active controls."]
4518    UTM_FLIGHT_STATE_NOCTRL = 32,
4519}
4520impl UtmFlightState {
4521    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4522}
4523impl Default for UtmFlightState {
4524    fn default() -> Self {
4525        Self::DEFAULT
4526    }
4527}
4528#[cfg_attr(feature = "ts", derive(TS))]
4529#[cfg_attr(feature = "ts", ts(export))]
4530#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4532#[cfg_attr(feature = "serde", serde(tag = "type"))]
4533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4534#[repr(u32)]
4535#[doc = "Video stream encodings"]
4536pub enum VideoStreamEncoding {
4537    #[doc = "Stream encoding is unknown"]
4538    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4539    #[doc = "Stream encoding is H.264"]
4540    VIDEO_STREAM_ENCODING_H264 = 1,
4541    #[doc = "Stream encoding is H.265"]
4542    VIDEO_STREAM_ENCODING_H265 = 2,
4543}
4544impl VideoStreamEncoding {
4545    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4546}
4547impl Default for VideoStreamEncoding {
4548    fn default() -> Self {
4549        Self::DEFAULT
4550    }
4551}
4552bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4553impl VideoStreamStatusFlags {
4554    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4555}
4556impl Default for VideoStreamStatusFlags {
4557    fn default() -> Self {
4558        Self::DEFAULT
4559    }
4560}
4561#[cfg_attr(feature = "ts", derive(TS))]
4562#[cfg_attr(feature = "ts", ts(export))]
4563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4565#[cfg_attr(feature = "serde", serde(tag = "type"))]
4566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4567#[repr(u32)]
4568#[doc = "Video stream types"]
4569pub enum VideoStreamType {
4570    #[doc = "Stream is RTSP"]
4571    VIDEO_STREAM_TYPE_RTSP = 0,
4572    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4573    VIDEO_STREAM_TYPE_RTPUDP = 1,
4574    #[doc = "Stream is MPEG on TCP"]
4575    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4576    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4577    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4578}
4579impl VideoStreamType {
4580    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4581}
4582impl Default for VideoStreamType {
4583    fn default() -> Self {
4584        Self::DEFAULT
4585    }
4586}
4587#[cfg_attr(feature = "ts", derive(TS))]
4588#[cfg_attr(feature = "ts", ts(export))]
4589#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4591#[cfg_attr(feature = "serde", serde(tag = "type"))]
4592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4593#[repr(u32)]
4594#[doc = "Direction of VTOL transition"]
4595pub enum VtolTransitionHeading {
4596    #[doc = "Respect the heading configuration of the vehicle."]
4597    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4598    #[doc = "Use the heading pointing towards the next waypoint."]
4599    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4600    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4601    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4602    #[doc = "Use the specified heading in parameter 4."]
4603    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4604    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4605    VTOL_TRANSITION_HEADING_ANY = 4,
4606}
4607impl VtolTransitionHeading {
4608    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4609}
4610impl Default for VtolTransitionHeading {
4611    fn default() -> Self {
4612        Self::DEFAULT
4613    }
4614}
4615#[cfg_attr(feature = "ts", derive(TS))]
4616#[cfg_attr(feature = "ts", ts(export))]
4617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4619#[cfg_attr(feature = "serde", serde(tag = "type"))]
4620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4621#[repr(u32)]
4622#[doc = "WiFi Mode."]
4623pub enum WifiConfigApMode {
4624    #[doc = "WiFi mode is undefined."]
4625    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4626    #[doc = "WiFi configured as an access point."]
4627    WIFI_CONFIG_AP_MODE_AP = 1,
4628    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4629    WIFI_CONFIG_AP_MODE_STATION = 2,
4630    #[doc = "WiFi disabled."]
4631    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4632}
4633impl WifiConfigApMode {
4634    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4635}
4636impl Default for WifiConfigApMode {
4637    fn default() -> Self {
4638        Self::DEFAULT
4639    }
4640}
4641#[cfg_attr(feature = "ts", derive(TS))]
4642#[cfg_attr(feature = "ts", ts(export))]
4643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4645#[cfg_attr(feature = "serde", serde(tag = "type"))]
4646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4647#[repr(u32)]
4648#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4649pub enum WifiConfigApResponse {
4650    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4651    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4652    #[doc = "Changes accepted."]
4653    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4654    #[doc = "Changes rejected."]
4655    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4656    #[doc = "Invalid Mode."]
4657    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4658    #[doc = "Invalid SSID."]
4659    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4660    #[doc = "Invalid Password."]
4661    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4662}
4663impl WifiConfigApResponse {
4664    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4665}
4666impl Default for WifiConfigApResponse {
4667    fn default() -> Self {
4668        Self::DEFAULT
4669    }
4670}
4671#[cfg_attr(feature = "ts", derive(TS))]
4672#[cfg_attr(feature = "ts", ts(export))]
4673#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4675#[cfg_attr(feature = "serde", serde(tag = "type"))]
4676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4677#[repr(u32)]
4678#[doc = "Winch actions."]
4679pub enum WinchActions {
4680    #[doc = "Allow motor to freewheel."]
4681    WINCH_RELAXED = 0,
4682    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4683    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4684    #[doc = "Wind or unwind line at specified rate."]
4685    WINCH_RATE_CONTROL = 2,
4686    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4687    WINCH_LOCK = 3,
4688    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4689    WINCH_DELIVER = 4,
4690    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4691    WINCH_HOLD = 5,
4692    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4693    WINCH_RETRACT = 6,
4694    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4695    WINCH_LOAD_LINE = 7,
4696    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4697    WINCH_ABANDON_LINE = 8,
4698    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4699    WINCH_LOAD_PAYLOAD = 9,
4700}
4701impl WinchActions {
4702    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4703}
4704impl Default for WinchActions {
4705    fn default() -> Self {
4706        Self::DEFAULT
4707    }
4708}
4709#[doc = "Set the vehicle attitude and body angular rates."]
4710#[doc = ""]
4711#[doc = "ID: 140"]
4712#[derive(Debug, Clone, PartialEq)]
4713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4715#[cfg_attr(feature = "ts", derive(TS))]
4716#[cfg_attr(feature = "ts", ts(export))]
4717pub struct ACTUATOR_CONTROL_TARGET_DATA {
4718    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4719    pub time_usec: u64,
4720    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4723    pub controls: [f32; 8],
4724    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4725    pub group_mlx: u8,
4726}
4727impl ACTUATOR_CONTROL_TARGET_DATA {
4728    pub const ENCODED_LEN: usize = 41usize;
4729    pub const DEFAULT: Self = Self {
4730        time_usec: 0_u64,
4731        controls: [0.0_f32; 8usize],
4732        group_mlx: 0_u8,
4733    };
4734    #[cfg(feature = "arbitrary")]
4735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4736        use arbitrary::{Arbitrary, Unstructured};
4737        let mut buf = [0u8; 1024];
4738        rng.fill_bytes(&mut buf);
4739        let mut unstructured = Unstructured::new(&buf);
4740        Self::arbitrary(&mut unstructured).unwrap_or_default()
4741    }
4742}
4743impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4744    fn default() -> Self {
4745        Self::DEFAULT.clone()
4746    }
4747}
4748impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4749    type Message = MavMessage;
4750    const ID: u32 = 140u32;
4751    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4752    const EXTRA_CRC: u8 = 181u8;
4753    const ENCODED_LEN: usize = 41usize;
4754    fn deser(
4755        _version: MavlinkVersion,
4756        __input: &[u8],
4757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4758        let avail_len = __input.len();
4759        let mut payload_buf = [0; Self::ENCODED_LEN];
4760        let mut buf = if avail_len < Self::ENCODED_LEN {
4761            payload_buf[0..avail_len].copy_from_slice(__input);
4762            Bytes::new(&payload_buf)
4763        } else {
4764            Bytes::new(__input)
4765        };
4766        let mut __struct = Self::default();
4767        __struct.time_usec = buf.get_u64_le();
4768        for v in &mut __struct.controls {
4769            let val = buf.get_f32_le();
4770            *v = val;
4771        }
4772        __struct.group_mlx = buf.get_u8();
4773        Ok(__struct)
4774    }
4775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4776        let mut __tmp = BytesMut::new(bytes);
4777        #[allow(clippy::absurd_extreme_comparisons)]
4778        #[allow(unused_comparisons)]
4779        if __tmp.remaining() < Self::ENCODED_LEN {
4780            panic!(
4781                "buffer is too small (need {} bytes, but got {})",
4782                Self::ENCODED_LEN,
4783                __tmp.remaining(),
4784            )
4785        }
4786        __tmp.put_u64_le(self.time_usec);
4787        for val in &self.controls {
4788            __tmp.put_f32_le(*val);
4789        }
4790        __tmp.put_u8(self.group_mlx);
4791        if matches!(version, MavlinkVersion::V2) {
4792            let len = __tmp.len();
4793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4794        } else {
4795            __tmp.len()
4796        }
4797    }
4798}
4799#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4800#[doc = ""]
4801#[doc = "ID: 375"]
4802#[derive(Debug, Clone, PartialEq)]
4803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4805#[cfg_attr(feature = "ts", derive(TS))]
4806#[cfg_attr(feature = "ts", ts(export))]
4807pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4808    #[doc = "Timestamp (since system boot)."]
4809    pub time_usec: u64,
4810    #[doc = "Active outputs"]
4811    pub active: u32,
4812    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4814    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4815    pub actuator: [f32; 32],
4816}
4817impl ACTUATOR_OUTPUT_STATUS_DATA {
4818    pub const ENCODED_LEN: usize = 140usize;
4819    pub const DEFAULT: Self = Self {
4820        time_usec: 0_u64,
4821        active: 0_u32,
4822        actuator: [0.0_f32; 32usize],
4823    };
4824    #[cfg(feature = "arbitrary")]
4825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4826        use arbitrary::{Arbitrary, Unstructured};
4827        let mut buf = [0u8; 1024];
4828        rng.fill_bytes(&mut buf);
4829        let mut unstructured = Unstructured::new(&buf);
4830        Self::arbitrary(&mut unstructured).unwrap_or_default()
4831    }
4832}
4833impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4834    fn default() -> Self {
4835        Self::DEFAULT.clone()
4836    }
4837}
4838impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4839    type Message = MavMessage;
4840    const ID: u32 = 375u32;
4841    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4842    const EXTRA_CRC: u8 = 251u8;
4843    const ENCODED_LEN: usize = 140usize;
4844    fn deser(
4845        _version: MavlinkVersion,
4846        __input: &[u8],
4847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4848        let avail_len = __input.len();
4849        let mut payload_buf = [0; Self::ENCODED_LEN];
4850        let mut buf = if avail_len < Self::ENCODED_LEN {
4851            payload_buf[0..avail_len].copy_from_slice(__input);
4852            Bytes::new(&payload_buf)
4853        } else {
4854            Bytes::new(__input)
4855        };
4856        let mut __struct = Self::default();
4857        __struct.time_usec = buf.get_u64_le();
4858        __struct.active = buf.get_u32_le();
4859        for v in &mut __struct.actuator {
4860            let val = buf.get_f32_le();
4861            *v = val;
4862        }
4863        Ok(__struct)
4864    }
4865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4866        let mut __tmp = BytesMut::new(bytes);
4867        #[allow(clippy::absurd_extreme_comparisons)]
4868        #[allow(unused_comparisons)]
4869        if __tmp.remaining() < Self::ENCODED_LEN {
4870            panic!(
4871                "buffer is too small (need {} bytes, but got {})",
4872                Self::ENCODED_LEN,
4873                __tmp.remaining(),
4874            )
4875        }
4876        __tmp.put_u64_le(self.time_usec);
4877        __tmp.put_u32_le(self.active);
4878        for val in &self.actuator {
4879            __tmp.put_f32_le(*val);
4880        }
4881        if matches!(version, MavlinkVersion::V2) {
4882            let len = __tmp.len();
4883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4884        } else {
4885            __tmp.len()
4886        }
4887    }
4888}
4889#[doc = "The location and information of an ADSB vehicle."]
4890#[doc = ""]
4891#[doc = "ID: 246"]
4892#[derive(Debug, Clone, PartialEq)]
4893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4895#[cfg_attr(feature = "ts", derive(TS))]
4896#[cfg_attr(feature = "ts", ts(export))]
4897pub struct ADSB_VEHICLE_DATA {
4898    #[doc = "ICAO address"]
4899    pub ICAO_address: u32,
4900    #[doc = "Latitude"]
4901    pub lat: i32,
4902    #[doc = "Longitude"]
4903    pub lon: i32,
4904    #[doc = "Altitude(ASL)"]
4905    pub altitude: i32,
4906    #[doc = "Course over ground"]
4907    pub heading: u16,
4908    #[doc = "The horizontal velocity"]
4909    pub hor_velocity: u16,
4910    #[doc = "The vertical velocity. Positive is up"]
4911    pub ver_velocity: i16,
4912    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4913    pub flags: AdsbFlags,
4914    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4915    pub squawk: u16,
4916    #[doc = "ADSB altitude type."]
4917    pub altitude_type: AdsbAltitudeType,
4918    #[doc = "The callsign, 8+null"]
4919    #[cfg_attr(feature = "ts", ts(type = "string"))]
4920    pub callsign: CharArray<9>,
4921    #[doc = "ADSB emitter type."]
4922    pub emitter_type: AdsbEmitterType,
4923    #[doc = "Time since last communication in seconds"]
4924    pub tslc: u8,
4925}
4926impl ADSB_VEHICLE_DATA {
4927    pub const ENCODED_LEN: usize = 38usize;
4928    pub const DEFAULT: Self = Self {
4929        ICAO_address: 0_u32,
4930        lat: 0_i32,
4931        lon: 0_i32,
4932        altitude: 0_i32,
4933        heading: 0_u16,
4934        hor_velocity: 0_u16,
4935        ver_velocity: 0_i16,
4936        flags: AdsbFlags::DEFAULT,
4937        squawk: 0_u16,
4938        altitude_type: AdsbAltitudeType::DEFAULT,
4939        callsign: CharArray::new([0_u8; 9usize]),
4940        emitter_type: AdsbEmitterType::DEFAULT,
4941        tslc: 0_u8,
4942    };
4943    #[cfg(feature = "arbitrary")]
4944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4945        use arbitrary::{Arbitrary, Unstructured};
4946        let mut buf = [0u8; 1024];
4947        rng.fill_bytes(&mut buf);
4948        let mut unstructured = Unstructured::new(&buf);
4949        Self::arbitrary(&mut unstructured).unwrap_or_default()
4950    }
4951}
4952impl Default for ADSB_VEHICLE_DATA {
4953    fn default() -> Self {
4954        Self::DEFAULT.clone()
4955    }
4956}
4957impl MessageData for ADSB_VEHICLE_DATA {
4958    type Message = MavMessage;
4959    const ID: u32 = 246u32;
4960    const NAME: &'static str = "ADSB_VEHICLE";
4961    const EXTRA_CRC: u8 = 184u8;
4962    const ENCODED_LEN: usize = 38usize;
4963    fn deser(
4964        _version: MavlinkVersion,
4965        __input: &[u8],
4966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4967        let avail_len = __input.len();
4968        let mut payload_buf = [0; Self::ENCODED_LEN];
4969        let mut buf = if avail_len < Self::ENCODED_LEN {
4970            payload_buf[0..avail_len].copy_from_slice(__input);
4971            Bytes::new(&payload_buf)
4972        } else {
4973            Bytes::new(__input)
4974        };
4975        let mut __struct = Self::default();
4976        __struct.ICAO_address = buf.get_u32_le();
4977        __struct.lat = buf.get_i32_le();
4978        __struct.lon = buf.get_i32_le();
4979        __struct.altitude = buf.get_i32_le();
4980        __struct.heading = buf.get_u16_le();
4981        __struct.hor_velocity = buf.get_u16_le();
4982        __struct.ver_velocity = buf.get_i16_le();
4983        let tmp = buf.get_u16_le();
4984        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4985            ::mavlink_core::error::ParserError::InvalidFlag {
4986                flag_type: "AdsbFlags",
4987                value: tmp as u32,
4988            },
4989        )?;
4990        __struct.squawk = buf.get_u16_le();
4991        let tmp = buf.get_u8();
4992        __struct.altitude_type =
4993            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4994                enum_type: "AdsbAltitudeType",
4995                value: tmp as u32,
4996            })?;
4997        let mut tmp = [0_u8; 9usize];
4998        for v in &mut tmp {
4999            *v = buf.get_u8();
5000        }
5001        __struct.callsign = CharArray::new(tmp);
5002        let tmp = buf.get_u8();
5003        __struct.emitter_type =
5004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5005                enum_type: "AdsbEmitterType",
5006                value: tmp as u32,
5007            })?;
5008        __struct.tslc = buf.get_u8();
5009        Ok(__struct)
5010    }
5011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5012        let mut __tmp = BytesMut::new(bytes);
5013        #[allow(clippy::absurd_extreme_comparisons)]
5014        #[allow(unused_comparisons)]
5015        if __tmp.remaining() < Self::ENCODED_LEN {
5016            panic!(
5017                "buffer is too small (need {} bytes, but got {})",
5018                Self::ENCODED_LEN,
5019                __tmp.remaining(),
5020            )
5021        }
5022        __tmp.put_u32_le(self.ICAO_address);
5023        __tmp.put_i32_le(self.lat);
5024        __tmp.put_i32_le(self.lon);
5025        __tmp.put_i32_le(self.altitude);
5026        __tmp.put_u16_le(self.heading);
5027        __tmp.put_u16_le(self.hor_velocity);
5028        __tmp.put_i16_le(self.ver_velocity);
5029        __tmp.put_u16_le(self.flags.bits());
5030        __tmp.put_u16_le(self.squawk);
5031        __tmp.put_u8(self.altitude_type as u8);
5032        for val in &self.callsign {
5033            __tmp.put_u8(*val);
5034        }
5035        __tmp.put_u8(self.emitter_type as u8);
5036        __tmp.put_u8(self.tslc);
5037        if matches!(version, MavlinkVersion::V2) {
5038            let len = __tmp.len();
5039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5040        } else {
5041            __tmp.len()
5042        }
5043    }
5044}
5045#[doc = "The airspeed measured by sensors and IMU."]
5046#[doc = ""]
5047#[doc = "ID: 182"]
5048#[derive(Debug, Clone, PartialEq)]
5049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5051#[cfg_attr(feature = "ts", derive(TS))]
5052#[cfg_attr(feature = "ts", ts(export))]
5053pub struct AIRSPEEDS_DATA {
5054    #[doc = "Timestamp (milliseconds since system boot)"]
5055    pub time_boot_ms: u32,
5056    #[doc = "Airspeed estimate from IMU, cm/s"]
5057    pub airspeed_imu: i16,
5058    #[doc = "Pitot measured forward airpseed, cm/s"]
5059    pub airspeed_pitot: i16,
5060    #[doc = "Hot wire anenometer measured airspeed, cm/s"]
5061    pub airspeed_hot_wire: i16,
5062    #[doc = "Ultrasonic measured airspeed, cm/s"]
5063    pub airspeed_ultrasonic: i16,
5064    #[doc = "Angle of attack sensor, degrees * 10"]
5065    pub aoa: i16,
5066    #[doc = "Yaw angle sensor, degrees * 10"]
5067    pub aoy: i16,
5068}
5069impl AIRSPEEDS_DATA {
5070    pub const ENCODED_LEN: usize = 16usize;
5071    pub const DEFAULT: Self = Self {
5072        time_boot_ms: 0_u32,
5073        airspeed_imu: 0_i16,
5074        airspeed_pitot: 0_i16,
5075        airspeed_hot_wire: 0_i16,
5076        airspeed_ultrasonic: 0_i16,
5077        aoa: 0_i16,
5078        aoy: 0_i16,
5079    };
5080    #[cfg(feature = "arbitrary")]
5081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5082        use arbitrary::{Arbitrary, Unstructured};
5083        let mut buf = [0u8; 1024];
5084        rng.fill_bytes(&mut buf);
5085        let mut unstructured = Unstructured::new(&buf);
5086        Self::arbitrary(&mut unstructured).unwrap_or_default()
5087    }
5088}
5089impl Default for AIRSPEEDS_DATA {
5090    fn default() -> Self {
5091        Self::DEFAULT.clone()
5092    }
5093}
5094impl MessageData for AIRSPEEDS_DATA {
5095    type Message = MavMessage;
5096    const ID: u32 = 182u32;
5097    const NAME: &'static str = "AIRSPEEDS";
5098    const EXTRA_CRC: u8 = 154u8;
5099    const ENCODED_LEN: usize = 16usize;
5100    fn deser(
5101        _version: MavlinkVersion,
5102        __input: &[u8],
5103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5104        let avail_len = __input.len();
5105        let mut payload_buf = [0; Self::ENCODED_LEN];
5106        let mut buf = if avail_len < Self::ENCODED_LEN {
5107            payload_buf[0..avail_len].copy_from_slice(__input);
5108            Bytes::new(&payload_buf)
5109        } else {
5110            Bytes::new(__input)
5111        };
5112        let mut __struct = Self::default();
5113        __struct.time_boot_ms = buf.get_u32_le();
5114        __struct.airspeed_imu = buf.get_i16_le();
5115        __struct.airspeed_pitot = buf.get_i16_le();
5116        __struct.airspeed_hot_wire = buf.get_i16_le();
5117        __struct.airspeed_ultrasonic = buf.get_i16_le();
5118        __struct.aoa = buf.get_i16_le();
5119        __struct.aoy = buf.get_i16_le();
5120        Ok(__struct)
5121    }
5122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5123        let mut __tmp = BytesMut::new(bytes);
5124        #[allow(clippy::absurd_extreme_comparisons)]
5125        #[allow(unused_comparisons)]
5126        if __tmp.remaining() < Self::ENCODED_LEN {
5127            panic!(
5128                "buffer is too small (need {} bytes, but got {})",
5129                Self::ENCODED_LEN,
5130                __tmp.remaining(),
5131            )
5132        }
5133        __tmp.put_u32_le(self.time_boot_ms);
5134        __tmp.put_i16_le(self.airspeed_imu);
5135        __tmp.put_i16_le(self.airspeed_pitot);
5136        __tmp.put_i16_le(self.airspeed_hot_wire);
5137        __tmp.put_i16_le(self.airspeed_ultrasonic);
5138        __tmp.put_i16_le(self.aoa);
5139        __tmp.put_i16_le(self.aoy);
5140        if matches!(version, MavlinkVersion::V2) {
5141            let len = __tmp.len();
5142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5143        } else {
5144            __tmp.len()
5145        }
5146    }
5147}
5148#[doc = "The location and information of an AIS vessel."]
5149#[doc = ""]
5150#[doc = "ID: 301"]
5151#[derive(Debug, Clone, PartialEq)]
5152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5154#[cfg_attr(feature = "ts", derive(TS))]
5155#[cfg_attr(feature = "ts", ts(export))]
5156pub struct AIS_VESSEL_DATA {
5157    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5158    pub MMSI: u32,
5159    #[doc = "Latitude"]
5160    pub lat: i32,
5161    #[doc = "Longitude"]
5162    pub lon: i32,
5163    #[doc = "Course over ground"]
5164    pub COG: u16,
5165    #[doc = "True heading"]
5166    pub heading: u16,
5167    #[doc = "Speed over ground"]
5168    pub velocity: u16,
5169    #[doc = "Distance from lat/lon location to bow"]
5170    pub dimension_bow: u16,
5171    #[doc = "Distance from lat/lon location to stern"]
5172    pub dimension_stern: u16,
5173    #[doc = "Time since last communication in seconds"]
5174    pub tslc: u16,
5175    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5176    pub flags: AisFlags,
5177    #[doc = "Turn rate"]
5178    pub turn_rate: i8,
5179    #[doc = "Navigational status"]
5180    pub navigational_status: AisNavStatus,
5181    #[doc = "Type of vessels"]
5182    pub mavtype: AisType,
5183    #[doc = "Distance from lat/lon location to port side"]
5184    pub dimension_port: u8,
5185    #[doc = "Distance from lat/lon location to starboard side"]
5186    pub dimension_starboard: u8,
5187    #[doc = "The vessel callsign"]
5188    #[cfg_attr(feature = "ts", ts(type = "string"))]
5189    pub callsign: CharArray<7>,
5190    #[doc = "The vessel name"]
5191    #[cfg_attr(feature = "ts", ts(type = "string"))]
5192    pub name: CharArray<20>,
5193}
5194impl AIS_VESSEL_DATA {
5195    pub const ENCODED_LEN: usize = 58usize;
5196    pub const DEFAULT: Self = Self {
5197        MMSI: 0_u32,
5198        lat: 0_i32,
5199        lon: 0_i32,
5200        COG: 0_u16,
5201        heading: 0_u16,
5202        velocity: 0_u16,
5203        dimension_bow: 0_u16,
5204        dimension_stern: 0_u16,
5205        tslc: 0_u16,
5206        flags: AisFlags::DEFAULT,
5207        turn_rate: 0_i8,
5208        navigational_status: AisNavStatus::DEFAULT,
5209        mavtype: AisType::DEFAULT,
5210        dimension_port: 0_u8,
5211        dimension_starboard: 0_u8,
5212        callsign: CharArray::new([0_u8; 7usize]),
5213        name: CharArray::new([0_u8; 20usize]),
5214    };
5215    #[cfg(feature = "arbitrary")]
5216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5217        use arbitrary::{Arbitrary, Unstructured};
5218        let mut buf = [0u8; 1024];
5219        rng.fill_bytes(&mut buf);
5220        let mut unstructured = Unstructured::new(&buf);
5221        Self::arbitrary(&mut unstructured).unwrap_or_default()
5222    }
5223}
5224impl Default for AIS_VESSEL_DATA {
5225    fn default() -> Self {
5226        Self::DEFAULT.clone()
5227    }
5228}
5229impl MessageData for AIS_VESSEL_DATA {
5230    type Message = MavMessage;
5231    const ID: u32 = 301u32;
5232    const NAME: &'static str = "AIS_VESSEL";
5233    const EXTRA_CRC: u8 = 243u8;
5234    const ENCODED_LEN: usize = 58usize;
5235    fn deser(
5236        _version: MavlinkVersion,
5237        __input: &[u8],
5238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5239        let avail_len = __input.len();
5240        let mut payload_buf = [0; Self::ENCODED_LEN];
5241        let mut buf = if avail_len < Self::ENCODED_LEN {
5242            payload_buf[0..avail_len].copy_from_slice(__input);
5243            Bytes::new(&payload_buf)
5244        } else {
5245            Bytes::new(__input)
5246        };
5247        let mut __struct = Self::default();
5248        __struct.MMSI = buf.get_u32_le();
5249        __struct.lat = buf.get_i32_le();
5250        __struct.lon = buf.get_i32_le();
5251        __struct.COG = buf.get_u16_le();
5252        __struct.heading = buf.get_u16_le();
5253        __struct.velocity = buf.get_u16_le();
5254        __struct.dimension_bow = buf.get_u16_le();
5255        __struct.dimension_stern = buf.get_u16_le();
5256        __struct.tslc = buf.get_u16_le();
5257        let tmp = buf.get_u16_le();
5258        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5259            ::mavlink_core::error::ParserError::InvalidFlag {
5260                flag_type: "AisFlags",
5261                value: tmp as u32,
5262            },
5263        )?;
5264        __struct.turn_rate = buf.get_i8();
5265        let tmp = buf.get_u8();
5266        __struct.navigational_status =
5267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5268                enum_type: "AisNavStatus",
5269                value: tmp as u32,
5270            })?;
5271        let tmp = buf.get_u8();
5272        __struct.mavtype =
5273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5274                enum_type: "AisType",
5275                value: tmp as u32,
5276            })?;
5277        __struct.dimension_port = buf.get_u8();
5278        __struct.dimension_starboard = buf.get_u8();
5279        let mut tmp = [0_u8; 7usize];
5280        for v in &mut tmp {
5281            *v = buf.get_u8();
5282        }
5283        __struct.callsign = CharArray::new(tmp);
5284        let mut tmp = [0_u8; 20usize];
5285        for v in &mut tmp {
5286            *v = buf.get_u8();
5287        }
5288        __struct.name = CharArray::new(tmp);
5289        Ok(__struct)
5290    }
5291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5292        let mut __tmp = BytesMut::new(bytes);
5293        #[allow(clippy::absurd_extreme_comparisons)]
5294        #[allow(unused_comparisons)]
5295        if __tmp.remaining() < Self::ENCODED_LEN {
5296            panic!(
5297                "buffer is too small (need {} bytes, but got {})",
5298                Self::ENCODED_LEN,
5299                __tmp.remaining(),
5300            )
5301        }
5302        __tmp.put_u32_le(self.MMSI);
5303        __tmp.put_i32_le(self.lat);
5304        __tmp.put_i32_le(self.lon);
5305        __tmp.put_u16_le(self.COG);
5306        __tmp.put_u16_le(self.heading);
5307        __tmp.put_u16_le(self.velocity);
5308        __tmp.put_u16_le(self.dimension_bow);
5309        __tmp.put_u16_le(self.dimension_stern);
5310        __tmp.put_u16_le(self.tslc);
5311        __tmp.put_u16_le(self.flags.bits());
5312        __tmp.put_i8(self.turn_rate);
5313        __tmp.put_u8(self.navigational_status as u8);
5314        __tmp.put_u8(self.mavtype as u8);
5315        __tmp.put_u8(self.dimension_port);
5316        __tmp.put_u8(self.dimension_starboard);
5317        for val in &self.callsign {
5318            __tmp.put_u8(*val);
5319        }
5320        for val in &self.name {
5321            __tmp.put_u8(*val);
5322        }
5323        if matches!(version, MavlinkVersion::V2) {
5324            let len = __tmp.len();
5325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5326        } else {
5327            __tmp.len()
5328        }
5329    }
5330}
5331#[doc = "The current system altitude."]
5332#[doc = ""]
5333#[doc = "ID: 141"]
5334#[derive(Debug, Clone, PartialEq)]
5335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5337#[cfg_attr(feature = "ts", derive(TS))]
5338#[cfg_attr(feature = "ts", ts(export))]
5339pub struct ALTITUDE_DATA {
5340    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5341    pub time_usec: u64,
5342    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5343    pub altitude_monotonic: f32,
5344    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5345    pub altitude_amsl: f32,
5346    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5347    pub altitude_local: f32,
5348    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5349    pub altitude_relative: f32,
5350    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5351    pub altitude_terrain: f32,
5352    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5353    pub bottom_clearance: f32,
5354}
5355impl ALTITUDE_DATA {
5356    pub const ENCODED_LEN: usize = 32usize;
5357    pub const DEFAULT: Self = Self {
5358        time_usec: 0_u64,
5359        altitude_monotonic: 0.0_f32,
5360        altitude_amsl: 0.0_f32,
5361        altitude_local: 0.0_f32,
5362        altitude_relative: 0.0_f32,
5363        altitude_terrain: 0.0_f32,
5364        bottom_clearance: 0.0_f32,
5365    };
5366    #[cfg(feature = "arbitrary")]
5367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5368        use arbitrary::{Arbitrary, Unstructured};
5369        let mut buf = [0u8; 1024];
5370        rng.fill_bytes(&mut buf);
5371        let mut unstructured = Unstructured::new(&buf);
5372        Self::arbitrary(&mut unstructured).unwrap_or_default()
5373    }
5374}
5375impl Default for ALTITUDE_DATA {
5376    fn default() -> Self {
5377        Self::DEFAULT.clone()
5378    }
5379}
5380impl MessageData for ALTITUDE_DATA {
5381    type Message = MavMessage;
5382    const ID: u32 = 141u32;
5383    const NAME: &'static str = "ALTITUDE";
5384    const EXTRA_CRC: u8 = 47u8;
5385    const ENCODED_LEN: usize = 32usize;
5386    fn deser(
5387        _version: MavlinkVersion,
5388        __input: &[u8],
5389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5390        let avail_len = __input.len();
5391        let mut payload_buf = [0; Self::ENCODED_LEN];
5392        let mut buf = if avail_len < Self::ENCODED_LEN {
5393            payload_buf[0..avail_len].copy_from_slice(__input);
5394            Bytes::new(&payload_buf)
5395        } else {
5396            Bytes::new(__input)
5397        };
5398        let mut __struct = Self::default();
5399        __struct.time_usec = buf.get_u64_le();
5400        __struct.altitude_monotonic = buf.get_f32_le();
5401        __struct.altitude_amsl = buf.get_f32_le();
5402        __struct.altitude_local = buf.get_f32_le();
5403        __struct.altitude_relative = buf.get_f32_le();
5404        __struct.altitude_terrain = buf.get_f32_le();
5405        __struct.bottom_clearance = buf.get_f32_le();
5406        Ok(__struct)
5407    }
5408    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5409        let mut __tmp = BytesMut::new(bytes);
5410        #[allow(clippy::absurd_extreme_comparisons)]
5411        #[allow(unused_comparisons)]
5412        if __tmp.remaining() < Self::ENCODED_LEN {
5413            panic!(
5414                "buffer is too small (need {} bytes, but got {})",
5415                Self::ENCODED_LEN,
5416                __tmp.remaining(),
5417            )
5418        }
5419        __tmp.put_u64_le(self.time_usec);
5420        __tmp.put_f32_le(self.altitude_monotonic);
5421        __tmp.put_f32_le(self.altitude_amsl);
5422        __tmp.put_f32_le(self.altitude_local);
5423        __tmp.put_f32_le(self.altitude_relative);
5424        __tmp.put_f32_le(self.altitude_terrain);
5425        __tmp.put_f32_le(self.bottom_clearance);
5426        if matches!(version, MavlinkVersion::V2) {
5427            let len = __tmp.len();
5428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5429        } else {
5430            __tmp.len()
5431        }
5432    }
5433}
5434#[doc = "The altitude measured by sensors and IMU."]
5435#[doc = ""]
5436#[doc = "ID: 181"]
5437#[derive(Debug, Clone, PartialEq)]
5438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5440#[cfg_attr(feature = "ts", derive(TS))]
5441#[cfg_attr(feature = "ts", ts(export))]
5442pub struct ALTITUDES_DATA {
5443    #[doc = "Timestamp (milliseconds since system boot)"]
5444    pub time_boot_ms: u32,
5445    #[doc = "GPS altitude (MSL) in meters, expressed as * 1000 (millimeters)"]
5446    pub alt_gps: i32,
5447    #[doc = "IMU altitude above ground in meters, expressed as * 1000 (millimeters)"]
5448    pub alt_imu: i32,
5449    #[doc = "barometeric altitude above ground in meters, expressed as * 1000 (millimeters)"]
5450    pub alt_barometric: i32,
5451    #[doc = "Optical flow altitude above ground in meters, expressed as * 1000 (millimeters)"]
5452    pub alt_optical_flow: i32,
5453    #[doc = "Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters)"]
5454    pub alt_range_finder: i32,
5455    #[doc = "Extra altitude above ground in meters, expressed as * 1000 (millimeters)"]
5456    pub alt_extra: i32,
5457}
5458impl ALTITUDES_DATA {
5459    pub const ENCODED_LEN: usize = 28usize;
5460    pub const DEFAULT: Self = Self {
5461        time_boot_ms: 0_u32,
5462        alt_gps: 0_i32,
5463        alt_imu: 0_i32,
5464        alt_barometric: 0_i32,
5465        alt_optical_flow: 0_i32,
5466        alt_range_finder: 0_i32,
5467        alt_extra: 0_i32,
5468    };
5469    #[cfg(feature = "arbitrary")]
5470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5471        use arbitrary::{Arbitrary, Unstructured};
5472        let mut buf = [0u8; 1024];
5473        rng.fill_bytes(&mut buf);
5474        let mut unstructured = Unstructured::new(&buf);
5475        Self::arbitrary(&mut unstructured).unwrap_or_default()
5476    }
5477}
5478impl Default for ALTITUDES_DATA {
5479    fn default() -> Self {
5480        Self::DEFAULT.clone()
5481    }
5482}
5483impl MessageData for ALTITUDES_DATA {
5484    type Message = MavMessage;
5485    const ID: u32 = 181u32;
5486    const NAME: &'static str = "ALTITUDES";
5487    const EXTRA_CRC: u8 = 55u8;
5488    const ENCODED_LEN: usize = 28usize;
5489    fn deser(
5490        _version: MavlinkVersion,
5491        __input: &[u8],
5492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5493        let avail_len = __input.len();
5494        let mut payload_buf = [0; Self::ENCODED_LEN];
5495        let mut buf = if avail_len < Self::ENCODED_LEN {
5496            payload_buf[0..avail_len].copy_from_slice(__input);
5497            Bytes::new(&payload_buf)
5498        } else {
5499            Bytes::new(__input)
5500        };
5501        let mut __struct = Self::default();
5502        __struct.time_boot_ms = buf.get_u32_le();
5503        __struct.alt_gps = buf.get_i32_le();
5504        __struct.alt_imu = buf.get_i32_le();
5505        __struct.alt_barometric = buf.get_i32_le();
5506        __struct.alt_optical_flow = buf.get_i32_le();
5507        __struct.alt_range_finder = buf.get_i32_le();
5508        __struct.alt_extra = buf.get_i32_le();
5509        Ok(__struct)
5510    }
5511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5512        let mut __tmp = BytesMut::new(bytes);
5513        #[allow(clippy::absurd_extreme_comparisons)]
5514        #[allow(unused_comparisons)]
5515        if __tmp.remaining() < Self::ENCODED_LEN {
5516            panic!(
5517                "buffer is too small (need {} bytes, but got {})",
5518                Self::ENCODED_LEN,
5519                __tmp.remaining(),
5520            )
5521        }
5522        __tmp.put_u32_le(self.time_boot_ms);
5523        __tmp.put_i32_le(self.alt_gps);
5524        __tmp.put_i32_le(self.alt_imu);
5525        __tmp.put_i32_le(self.alt_barometric);
5526        __tmp.put_i32_le(self.alt_optical_flow);
5527        __tmp.put_i32_le(self.alt_range_finder);
5528        __tmp.put_i32_le(self.alt_extra);
5529        if matches!(version, MavlinkVersion::V2) {
5530            let len = __tmp.len();
5531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5532        } else {
5533            __tmp.len()
5534        }
5535    }
5536}
5537#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5538#[doc = ""]
5539#[doc = "ID: 30"]
5540#[derive(Debug, Clone, PartialEq)]
5541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5543#[cfg_attr(feature = "ts", derive(TS))]
5544#[cfg_attr(feature = "ts", ts(export))]
5545pub struct ATTITUDE_DATA {
5546    #[doc = "Timestamp (time since system boot)."]
5547    pub time_boot_ms: u32,
5548    #[doc = "Roll angle (-pi..+pi)"]
5549    pub roll: f32,
5550    #[doc = "Pitch angle (-pi..+pi)"]
5551    pub pitch: f32,
5552    #[doc = "Yaw angle (-pi..+pi)"]
5553    pub yaw: f32,
5554    #[doc = "Roll angular speed"]
5555    pub rollspeed: f32,
5556    #[doc = "Pitch angular speed"]
5557    pub pitchspeed: f32,
5558    #[doc = "Yaw angular speed"]
5559    pub yawspeed: f32,
5560}
5561impl ATTITUDE_DATA {
5562    pub const ENCODED_LEN: usize = 28usize;
5563    pub const DEFAULT: Self = Self {
5564        time_boot_ms: 0_u32,
5565        roll: 0.0_f32,
5566        pitch: 0.0_f32,
5567        yaw: 0.0_f32,
5568        rollspeed: 0.0_f32,
5569        pitchspeed: 0.0_f32,
5570        yawspeed: 0.0_f32,
5571    };
5572    #[cfg(feature = "arbitrary")]
5573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5574        use arbitrary::{Arbitrary, Unstructured};
5575        let mut buf = [0u8; 1024];
5576        rng.fill_bytes(&mut buf);
5577        let mut unstructured = Unstructured::new(&buf);
5578        Self::arbitrary(&mut unstructured).unwrap_or_default()
5579    }
5580}
5581impl Default for ATTITUDE_DATA {
5582    fn default() -> Self {
5583        Self::DEFAULT.clone()
5584    }
5585}
5586impl MessageData for ATTITUDE_DATA {
5587    type Message = MavMessage;
5588    const ID: u32 = 30u32;
5589    const NAME: &'static str = "ATTITUDE";
5590    const EXTRA_CRC: u8 = 39u8;
5591    const ENCODED_LEN: usize = 28usize;
5592    fn deser(
5593        _version: MavlinkVersion,
5594        __input: &[u8],
5595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5596        let avail_len = __input.len();
5597        let mut payload_buf = [0; Self::ENCODED_LEN];
5598        let mut buf = if avail_len < Self::ENCODED_LEN {
5599            payload_buf[0..avail_len].copy_from_slice(__input);
5600            Bytes::new(&payload_buf)
5601        } else {
5602            Bytes::new(__input)
5603        };
5604        let mut __struct = Self::default();
5605        __struct.time_boot_ms = buf.get_u32_le();
5606        __struct.roll = buf.get_f32_le();
5607        __struct.pitch = buf.get_f32_le();
5608        __struct.yaw = buf.get_f32_le();
5609        __struct.rollspeed = buf.get_f32_le();
5610        __struct.pitchspeed = buf.get_f32_le();
5611        __struct.yawspeed = buf.get_f32_le();
5612        Ok(__struct)
5613    }
5614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5615        let mut __tmp = BytesMut::new(bytes);
5616        #[allow(clippy::absurd_extreme_comparisons)]
5617        #[allow(unused_comparisons)]
5618        if __tmp.remaining() < Self::ENCODED_LEN {
5619            panic!(
5620                "buffer is too small (need {} bytes, but got {})",
5621                Self::ENCODED_LEN,
5622                __tmp.remaining(),
5623            )
5624        }
5625        __tmp.put_u32_le(self.time_boot_ms);
5626        __tmp.put_f32_le(self.roll);
5627        __tmp.put_f32_le(self.pitch);
5628        __tmp.put_f32_le(self.yaw);
5629        __tmp.put_f32_le(self.rollspeed);
5630        __tmp.put_f32_le(self.pitchspeed);
5631        __tmp.put_f32_le(self.yawspeed);
5632        if matches!(version, MavlinkVersion::V2) {
5633            let len = __tmp.len();
5634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5635        } else {
5636            __tmp.len()
5637        }
5638    }
5639}
5640#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5641#[doc = ""]
5642#[doc = "ID: 31"]
5643#[derive(Debug, Clone, PartialEq)]
5644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5646#[cfg_attr(feature = "ts", derive(TS))]
5647#[cfg_attr(feature = "ts", ts(export))]
5648pub struct ATTITUDE_QUATERNION_DATA {
5649    #[doc = "Timestamp (time since system boot)."]
5650    pub time_boot_ms: u32,
5651    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5652    pub q1: f32,
5653    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5654    pub q2: f32,
5655    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5656    pub q3: f32,
5657    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5658    pub q4: f32,
5659    #[doc = "Roll angular speed"]
5660    pub rollspeed: f32,
5661    #[doc = "Pitch angular speed"]
5662    pub pitchspeed: f32,
5663    #[doc = "Yaw angular speed"]
5664    pub yawspeed: f32,
5665    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5669    pub repr_offset_q: [f32; 4],
5670}
5671impl ATTITUDE_QUATERNION_DATA {
5672    pub const ENCODED_LEN: usize = 48usize;
5673    pub const DEFAULT: Self = Self {
5674        time_boot_ms: 0_u32,
5675        q1: 0.0_f32,
5676        q2: 0.0_f32,
5677        q3: 0.0_f32,
5678        q4: 0.0_f32,
5679        rollspeed: 0.0_f32,
5680        pitchspeed: 0.0_f32,
5681        yawspeed: 0.0_f32,
5682        repr_offset_q: [0.0_f32; 4usize],
5683    };
5684    #[cfg(feature = "arbitrary")]
5685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5686        use arbitrary::{Arbitrary, Unstructured};
5687        let mut buf = [0u8; 1024];
5688        rng.fill_bytes(&mut buf);
5689        let mut unstructured = Unstructured::new(&buf);
5690        Self::arbitrary(&mut unstructured).unwrap_or_default()
5691    }
5692}
5693impl Default for ATTITUDE_QUATERNION_DATA {
5694    fn default() -> Self {
5695        Self::DEFAULT.clone()
5696    }
5697}
5698impl MessageData for ATTITUDE_QUATERNION_DATA {
5699    type Message = MavMessage;
5700    const ID: u32 = 31u32;
5701    const NAME: &'static str = "ATTITUDE_QUATERNION";
5702    const EXTRA_CRC: u8 = 246u8;
5703    const ENCODED_LEN: usize = 48usize;
5704    fn deser(
5705        _version: MavlinkVersion,
5706        __input: &[u8],
5707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5708        let avail_len = __input.len();
5709        let mut payload_buf = [0; Self::ENCODED_LEN];
5710        let mut buf = if avail_len < Self::ENCODED_LEN {
5711            payload_buf[0..avail_len].copy_from_slice(__input);
5712            Bytes::new(&payload_buf)
5713        } else {
5714            Bytes::new(__input)
5715        };
5716        let mut __struct = Self::default();
5717        __struct.time_boot_ms = buf.get_u32_le();
5718        __struct.q1 = buf.get_f32_le();
5719        __struct.q2 = buf.get_f32_le();
5720        __struct.q3 = buf.get_f32_le();
5721        __struct.q4 = buf.get_f32_le();
5722        __struct.rollspeed = buf.get_f32_le();
5723        __struct.pitchspeed = buf.get_f32_le();
5724        __struct.yawspeed = buf.get_f32_le();
5725        for v in &mut __struct.repr_offset_q {
5726            let val = buf.get_f32_le();
5727            *v = val;
5728        }
5729        Ok(__struct)
5730    }
5731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5732        let mut __tmp = BytesMut::new(bytes);
5733        #[allow(clippy::absurd_extreme_comparisons)]
5734        #[allow(unused_comparisons)]
5735        if __tmp.remaining() < Self::ENCODED_LEN {
5736            panic!(
5737                "buffer is too small (need {} bytes, but got {})",
5738                Self::ENCODED_LEN,
5739                __tmp.remaining(),
5740            )
5741        }
5742        __tmp.put_u32_le(self.time_boot_ms);
5743        __tmp.put_f32_le(self.q1);
5744        __tmp.put_f32_le(self.q2);
5745        __tmp.put_f32_le(self.q3);
5746        __tmp.put_f32_le(self.q4);
5747        __tmp.put_f32_le(self.rollspeed);
5748        __tmp.put_f32_le(self.pitchspeed);
5749        __tmp.put_f32_le(self.yawspeed);
5750        if matches!(version, MavlinkVersion::V2) {
5751            for val in &self.repr_offset_q {
5752                __tmp.put_f32_le(*val);
5753            }
5754            let len = __tmp.len();
5755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5756        } else {
5757            __tmp.len()
5758        }
5759    }
5760}
5761#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5762#[doc = ""]
5763#[doc = "ID: 61"]
5764#[derive(Debug, Clone, PartialEq)]
5765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5767#[cfg_attr(feature = "ts", derive(TS))]
5768#[cfg_attr(feature = "ts", ts(export))]
5769pub struct ATTITUDE_QUATERNION_COV_DATA {
5770    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5771    pub time_usec: u64,
5772    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5775    pub q: [f32; 4],
5776    #[doc = "Roll angular speed"]
5777    pub rollspeed: f32,
5778    #[doc = "Pitch angular speed"]
5779    pub pitchspeed: f32,
5780    #[doc = "Yaw angular speed"]
5781    pub yawspeed: f32,
5782    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5783    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5784    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5785    pub covariance: [f32; 9],
5786}
5787impl ATTITUDE_QUATERNION_COV_DATA {
5788    pub const ENCODED_LEN: usize = 72usize;
5789    pub const DEFAULT: Self = Self {
5790        time_usec: 0_u64,
5791        q: [0.0_f32; 4usize],
5792        rollspeed: 0.0_f32,
5793        pitchspeed: 0.0_f32,
5794        yawspeed: 0.0_f32,
5795        covariance: [0.0_f32; 9usize],
5796    };
5797    #[cfg(feature = "arbitrary")]
5798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5799        use arbitrary::{Arbitrary, Unstructured};
5800        let mut buf = [0u8; 1024];
5801        rng.fill_bytes(&mut buf);
5802        let mut unstructured = Unstructured::new(&buf);
5803        Self::arbitrary(&mut unstructured).unwrap_or_default()
5804    }
5805}
5806impl Default for ATTITUDE_QUATERNION_COV_DATA {
5807    fn default() -> Self {
5808        Self::DEFAULT.clone()
5809    }
5810}
5811impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5812    type Message = MavMessage;
5813    const ID: u32 = 61u32;
5814    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5815    const EXTRA_CRC: u8 = 167u8;
5816    const ENCODED_LEN: usize = 72usize;
5817    fn deser(
5818        _version: MavlinkVersion,
5819        __input: &[u8],
5820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5821        let avail_len = __input.len();
5822        let mut payload_buf = [0; Self::ENCODED_LEN];
5823        let mut buf = if avail_len < Self::ENCODED_LEN {
5824            payload_buf[0..avail_len].copy_from_slice(__input);
5825            Bytes::new(&payload_buf)
5826        } else {
5827            Bytes::new(__input)
5828        };
5829        let mut __struct = Self::default();
5830        __struct.time_usec = buf.get_u64_le();
5831        for v in &mut __struct.q {
5832            let val = buf.get_f32_le();
5833            *v = val;
5834        }
5835        __struct.rollspeed = buf.get_f32_le();
5836        __struct.pitchspeed = buf.get_f32_le();
5837        __struct.yawspeed = buf.get_f32_le();
5838        for v in &mut __struct.covariance {
5839            let val = buf.get_f32_le();
5840            *v = val;
5841        }
5842        Ok(__struct)
5843    }
5844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5845        let mut __tmp = BytesMut::new(bytes);
5846        #[allow(clippy::absurd_extreme_comparisons)]
5847        #[allow(unused_comparisons)]
5848        if __tmp.remaining() < Self::ENCODED_LEN {
5849            panic!(
5850                "buffer is too small (need {} bytes, but got {})",
5851                Self::ENCODED_LEN,
5852                __tmp.remaining(),
5853            )
5854        }
5855        __tmp.put_u64_le(self.time_usec);
5856        for val in &self.q {
5857            __tmp.put_f32_le(*val);
5858        }
5859        __tmp.put_f32_le(self.rollspeed);
5860        __tmp.put_f32_le(self.pitchspeed);
5861        __tmp.put_f32_le(self.yawspeed);
5862        for val in &self.covariance {
5863            __tmp.put_f32_le(*val);
5864        }
5865        if matches!(version, MavlinkVersion::V2) {
5866            let len = __tmp.len();
5867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5868        } else {
5869            __tmp.len()
5870        }
5871    }
5872}
5873#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5874#[doc = ""]
5875#[doc = "ID: 83"]
5876#[derive(Debug, Clone, PartialEq)]
5877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5879#[cfg_attr(feature = "ts", derive(TS))]
5880#[cfg_attr(feature = "ts", ts(export))]
5881pub struct ATTITUDE_TARGET_DATA {
5882    #[doc = "Timestamp (time since system boot)."]
5883    pub time_boot_ms: u32,
5884    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5885    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5886    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5887    pub q: [f32; 4],
5888    #[doc = "Body roll rate"]
5889    pub body_roll_rate: f32,
5890    #[doc = "Body pitch rate"]
5891    pub body_pitch_rate: f32,
5892    #[doc = "Body yaw rate"]
5893    pub body_yaw_rate: f32,
5894    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5895    pub thrust: f32,
5896    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5897    pub type_mask: AttitudeTargetTypemask,
5898}
5899impl ATTITUDE_TARGET_DATA {
5900    pub const ENCODED_LEN: usize = 37usize;
5901    pub const DEFAULT: Self = Self {
5902        time_boot_ms: 0_u32,
5903        q: [0.0_f32; 4usize],
5904        body_roll_rate: 0.0_f32,
5905        body_pitch_rate: 0.0_f32,
5906        body_yaw_rate: 0.0_f32,
5907        thrust: 0.0_f32,
5908        type_mask: AttitudeTargetTypemask::DEFAULT,
5909    };
5910    #[cfg(feature = "arbitrary")]
5911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5912        use arbitrary::{Arbitrary, Unstructured};
5913        let mut buf = [0u8; 1024];
5914        rng.fill_bytes(&mut buf);
5915        let mut unstructured = Unstructured::new(&buf);
5916        Self::arbitrary(&mut unstructured).unwrap_or_default()
5917    }
5918}
5919impl Default for ATTITUDE_TARGET_DATA {
5920    fn default() -> Self {
5921        Self::DEFAULT.clone()
5922    }
5923}
5924impl MessageData for ATTITUDE_TARGET_DATA {
5925    type Message = MavMessage;
5926    const ID: u32 = 83u32;
5927    const NAME: &'static str = "ATTITUDE_TARGET";
5928    const EXTRA_CRC: u8 = 22u8;
5929    const ENCODED_LEN: usize = 37usize;
5930    fn deser(
5931        _version: MavlinkVersion,
5932        __input: &[u8],
5933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5934        let avail_len = __input.len();
5935        let mut payload_buf = [0; Self::ENCODED_LEN];
5936        let mut buf = if avail_len < Self::ENCODED_LEN {
5937            payload_buf[0..avail_len].copy_from_slice(__input);
5938            Bytes::new(&payload_buf)
5939        } else {
5940            Bytes::new(__input)
5941        };
5942        let mut __struct = Self::default();
5943        __struct.time_boot_ms = buf.get_u32_le();
5944        for v in &mut __struct.q {
5945            let val = buf.get_f32_le();
5946            *v = val;
5947        }
5948        __struct.body_roll_rate = buf.get_f32_le();
5949        __struct.body_pitch_rate = buf.get_f32_le();
5950        __struct.body_yaw_rate = buf.get_f32_le();
5951        __struct.thrust = buf.get_f32_le();
5952        let tmp = buf.get_u8();
5953        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5954            tmp & AttitudeTargetTypemask::all().bits(),
5955        )
5956        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5957            flag_type: "AttitudeTargetTypemask",
5958            value: tmp as u32,
5959        })?;
5960        Ok(__struct)
5961    }
5962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5963        let mut __tmp = BytesMut::new(bytes);
5964        #[allow(clippy::absurd_extreme_comparisons)]
5965        #[allow(unused_comparisons)]
5966        if __tmp.remaining() < Self::ENCODED_LEN {
5967            panic!(
5968                "buffer is too small (need {} bytes, but got {})",
5969                Self::ENCODED_LEN,
5970                __tmp.remaining(),
5971            )
5972        }
5973        __tmp.put_u32_le(self.time_boot_ms);
5974        for val in &self.q {
5975            __tmp.put_f32_le(*val);
5976        }
5977        __tmp.put_f32_le(self.body_roll_rate);
5978        __tmp.put_f32_le(self.body_pitch_rate);
5979        __tmp.put_f32_le(self.body_yaw_rate);
5980        __tmp.put_f32_le(self.thrust);
5981        __tmp.put_u8(self.type_mask.bits());
5982        if matches!(version, MavlinkVersion::V2) {
5983            let len = __tmp.len();
5984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5985        } else {
5986            __tmp.len()
5987        }
5988    }
5989}
5990#[doc = "Motion capture attitude and position."]
5991#[doc = ""]
5992#[doc = "ID: 138"]
5993#[derive(Debug, Clone, PartialEq)]
5994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5996#[cfg_attr(feature = "ts", derive(TS))]
5997#[cfg_attr(feature = "ts", ts(export))]
5998pub struct ATT_POS_MOCAP_DATA {
5999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6000    pub time_usec: u64,
6001    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6003    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6004    pub q: [f32; 4],
6005    #[doc = "X position (NED)"]
6006    pub x: f32,
6007    #[doc = "Y position (NED)"]
6008    pub y: f32,
6009    #[doc = "Z position (NED)"]
6010    pub z: f32,
6011    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6012    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6013    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6014    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6015    pub covariance: [f32; 21],
6016}
6017impl ATT_POS_MOCAP_DATA {
6018    pub const ENCODED_LEN: usize = 120usize;
6019    pub const DEFAULT: Self = Self {
6020        time_usec: 0_u64,
6021        q: [0.0_f32; 4usize],
6022        x: 0.0_f32,
6023        y: 0.0_f32,
6024        z: 0.0_f32,
6025        covariance: [0.0_f32; 21usize],
6026    };
6027    #[cfg(feature = "arbitrary")]
6028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6029        use arbitrary::{Arbitrary, Unstructured};
6030        let mut buf = [0u8; 1024];
6031        rng.fill_bytes(&mut buf);
6032        let mut unstructured = Unstructured::new(&buf);
6033        Self::arbitrary(&mut unstructured).unwrap_or_default()
6034    }
6035}
6036impl Default for ATT_POS_MOCAP_DATA {
6037    fn default() -> Self {
6038        Self::DEFAULT.clone()
6039    }
6040}
6041impl MessageData for ATT_POS_MOCAP_DATA {
6042    type Message = MavMessage;
6043    const ID: u32 = 138u32;
6044    const NAME: &'static str = "ATT_POS_MOCAP";
6045    const EXTRA_CRC: u8 = 109u8;
6046    const ENCODED_LEN: usize = 120usize;
6047    fn deser(
6048        _version: MavlinkVersion,
6049        __input: &[u8],
6050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6051        let avail_len = __input.len();
6052        let mut payload_buf = [0; Self::ENCODED_LEN];
6053        let mut buf = if avail_len < Self::ENCODED_LEN {
6054            payload_buf[0..avail_len].copy_from_slice(__input);
6055            Bytes::new(&payload_buf)
6056        } else {
6057            Bytes::new(__input)
6058        };
6059        let mut __struct = Self::default();
6060        __struct.time_usec = buf.get_u64_le();
6061        for v in &mut __struct.q {
6062            let val = buf.get_f32_le();
6063            *v = val;
6064        }
6065        __struct.x = buf.get_f32_le();
6066        __struct.y = buf.get_f32_le();
6067        __struct.z = buf.get_f32_le();
6068        for v in &mut __struct.covariance {
6069            let val = buf.get_f32_le();
6070            *v = val;
6071        }
6072        Ok(__struct)
6073    }
6074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6075        let mut __tmp = BytesMut::new(bytes);
6076        #[allow(clippy::absurd_extreme_comparisons)]
6077        #[allow(unused_comparisons)]
6078        if __tmp.remaining() < Self::ENCODED_LEN {
6079            panic!(
6080                "buffer is too small (need {} bytes, but got {})",
6081                Self::ENCODED_LEN,
6082                __tmp.remaining(),
6083            )
6084        }
6085        __tmp.put_u64_le(self.time_usec);
6086        for val in &self.q {
6087            __tmp.put_f32_le(*val);
6088        }
6089        __tmp.put_f32_le(self.x);
6090        __tmp.put_f32_le(self.y);
6091        __tmp.put_f32_le(self.z);
6092        if matches!(version, MavlinkVersion::V2) {
6093            for val in &self.covariance {
6094                __tmp.put_f32_le(*val);
6095            }
6096            let len = __tmp.len();
6097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6098        } else {
6099            __tmp.len()
6100        }
6101    }
6102}
6103#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6104#[doc = ""]
6105#[doc = "ID: 7"]
6106#[derive(Debug, Clone, PartialEq)]
6107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6109#[cfg_attr(feature = "ts", derive(TS))]
6110#[cfg_attr(feature = "ts", ts(export))]
6111pub struct AUTH_KEY_DATA {
6112    #[doc = "key"]
6113    #[cfg_attr(feature = "ts", ts(type = "string"))]
6114    pub key: CharArray<32>,
6115}
6116impl AUTH_KEY_DATA {
6117    pub const ENCODED_LEN: usize = 32usize;
6118    pub const DEFAULT: Self = Self {
6119        key: CharArray::new([0_u8; 32usize]),
6120    };
6121    #[cfg(feature = "arbitrary")]
6122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6123        use arbitrary::{Arbitrary, Unstructured};
6124        let mut buf = [0u8; 1024];
6125        rng.fill_bytes(&mut buf);
6126        let mut unstructured = Unstructured::new(&buf);
6127        Self::arbitrary(&mut unstructured).unwrap_or_default()
6128    }
6129}
6130impl Default for AUTH_KEY_DATA {
6131    fn default() -> Self {
6132        Self::DEFAULT.clone()
6133    }
6134}
6135impl MessageData for AUTH_KEY_DATA {
6136    type Message = MavMessage;
6137    const ID: u32 = 7u32;
6138    const NAME: &'static str = "AUTH_KEY";
6139    const EXTRA_CRC: u8 = 119u8;
6140    const ENCODED_LEN: usize = 32usize;
6141    fn deser(
6142        _version: MavlinkVersion,
6143        __input: &[u8],
6144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6145        let avail_len = __input.len();
6146        let mut payload_buf = [0; Self::ENCODED_LEN];
6147        let mut buf = if avail_len < Self::ENCODED_LEN {
6148            payload_buf[0..avail_len].copy_from_slice(__input);
6149            Bytes::new(&payload_buf)
6150        } else {
6151            Bytes::new(__input)
6152        };
6153        let mut __struct = Self::default();
6154        let mut tmp = [0_u8; 32usize];
6155        for v in &mut tmp {
6156            *v = buf.get_u8();
6157        }
6158        __struct.key = CharArray::new(tmp);
6159        Ok(__struct)
6160    }
6161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6162        let mut __tmp = BytesMut::new(bytes);
6163        #[allow(clippy::absurd_extreme_comparisons)]
6164        #[allow(unused_comparisons)]
6165        if __tmp.remaining() < Self::ENCODED_LEN {
6166            panic!(
6167                "buffer is too small (need {} bytes, but got {})",
6168                Self::ENCODED_LEN,
6169                __tmp.remaining(),
6170            )
6171        }
6172        for val in &self.key {
6173            __tmp.put_u8(*val);
6174        }
6175        if matches!(version, MavlinkVersion::V2) {
6176            let len = __tmp.len();
6177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6178        } else {
6179            __tmp.len()
6180        }
6181    }
6182}
6183#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6184#[doc = ""]
6185#[doc = "ID: 286"]
6186#[derive(Debug, Clone, PartialEq)]
6187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6189#[cfg_attr(feature = "ts", derive(TS))]
6190#[cfg_attr(feature = "ts", ts(export))]
6191pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6192    #[doc = "Timestamp (time since system boot)."]
6193    pub time_boot_us: u64,
6194    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6196    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6197    pub q: [f32; 4],
6198    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6199    pub q_estimated_delay_us: u32,
6200    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6201    pub vx: f32,
6202    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6203    pub vy: f32,
6204    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6205    pub vz: f32,
6206    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6207    pub v_estimated_delay_us: u32,
6208    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6209    pub feed_forward_angular_velocity_z: f32,
6210    #[doc = "Bitmap indicating which estimator outputs are valid."]
6211    pub estimator_status: EstimatorStatusFlags,
6212    #[doc = "System ID"]
6213    pub target_system: u8,
6214    #[doc = "Component ID"]
6215    pub target_component: u8,
6216    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6217    pub landed_state: MavLandedState,
6218    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6220    pub angular_velocity_z: f32,
6221}
6222impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6223    pub const ENCODED_LEN: usize = 57usize;
6224    pub const DEFAULT: Self = Self {
6225        time_boot_us: 0_u64,
6226        q: [0.0_f32; 4usize],
6227        q_estimated_delay_us: 0_u32,
6228        vx: 0.0_f32,
6229        vy: 0.0_f32,
6230        vz: 0.0_f32,
6231        v_estimated_delay_us: 0_u32,
6232        feed_forward_angular_velocity_z: 0.0_f32,
6233        estimator_status: EstimatorStatusFlags::DEFAULT,
6234        target_system: 0_u8,
6235        target_component: 0_u8,
6236        landed_state: MavLandedState::DEFAULT,
6237        angular_velocity_z: 0.0_f32,
6238    };
6239    #[cfg(feature = "arbitrary")]
6240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6241        use arbitrary::{Arbitrary, Unstructured};
6242        let mut buf = [0u8; 1024];
6243        rng.fill_bytes(&mut buf);
6244        let mut unstructured = Unstructured::new(&buf);
6245        Self::arbitrary(&mut unstructured).unwrap_or_default()
6246    }
6247}
6248impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6249    fn default() -> Self {
6250        Self::DEFAULT.clone()
6251    }
6252}
6253impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6254    type Message = MavMessage;
6255    const ID: u32 = 286u32;
6256    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6257    const EXTRA_CRC: u8 = 210u8;
6258    const ENCODED_LEN: usize = 57usize;
6259    fn deser(
6260        _version: MavlinkVersion,
6261        __input: &[u8],
6262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6263        let avail_len = __input.len();
6264        let mut payload_buf = [0; Self::ENCODED_LEN];
6265        let mut buf = if avail_len < Self::ENCODED_LEN {
6266            payload_buf[0..avail_len].copy_from_slice(__input);
6267            Bytes::new(&payload_buf)
6268        } else {
6269            Bytes::new(__input)
6270        };
6271        let mut __struct = Self::default();
6272        __struct.time_boot_us = buf.get_u64_le();
6273        for v in &mut __struct.q {
6274            let val = buf.get_f32_le();
6275            *v = val;
6276        }
6277        __struct.q_estimated_delay_us = buf.get_u32_le();
6278        __struct.vx = buf.get_f32_le();
6279        __struct.vy = buf.get_f32_le();
6280        __struct.vz = buf.get_f32_le();
6281        __struct.v_estimated_delay_us = buf.get_u32_le();
6282        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6283        let tmp = buf.get_u16_le();
6284        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6285            tmp & EstimatorStatusFlags::all().bits(),
6286        )
6287        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6288            flag_type: "EstimatorStatusFlags",
6289            value: tmp as u32,
6290        })?;
6291        __struct.target_system = buf.get_u8();
6292        __struct.target_component = buf.get_u8();
6293        let tmp = buf.get_u8();
6294        __struct.landed_state =
6295            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6296                enum_type: "MavLandedState",
6297                value: tmp as u32,
6298            })?;
6299        __struct.angular_velocity_z = buf.get_f32_le();
6300        Ok(__struct)
6301    }
6302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6303        let mut __tmp = BytesMut::new(bytes);
6304        #[allow(clippy::absurd_extreme_comparisons)]
6305        #[allow(unused_comparisons)]
6306        if __tmp.remaining() < Self::ENCODED_LEN {
6307            panic!(
6308                "buffer is too small (need {} bytes, but got {})",
6309                Self::ENCODED_LEN,
6310                __tmp.remaining(),
6311            )
6312        }
6313        __tmp.put_u64_le(self.time_boot_us);
6314        for val in &self.q {
6315            __tmp.put_f32_le(*val);
6316        }
6317        __tmp.put_u32_le(self.q_estimated_delay_us);
6318        __tmp.put_f32_le(self.vx);
6319        __tmp.put_f32_le(self.vy);
6320        __tmp.put_f32_le(self.vz);
6321        __tmp.put_u32_le(self.v_estimated_delay_us);
6322        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6323        __tmp.put_u16_le(self.estimator_status.bits());
6324        __tmp.put_u8(self.target_system);
6325        __tmp.put_u8(self.target_component);
6326        __tmp.put_u8(self.landed_state as u8);
6327        if matches!(version, MavlinkVersion::V2) {
6328            __tmp.put_f32_le(self.angular_velocity_z);
6329            let len = __tmp.len();
6330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6331        } else {
6332            __tmp.len()
6333        }
6334    }
6335}
6336#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6337#[doc = ""]
6338#[doc = "ID: 148"]
6339#[derive(Debug, Clone, PartialEq)]
6340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6342#[cfg_attr(feature = "ts", derive(TS))]
6343#[cfg_attr(feature = "ts", ts(export))]
6344pub struct AUTOPILOT_VERSION_DATA {
6345    #[doc = "Bitmap of capabilities"]
6346    pub capabilities: MavProtocolCapability,
6347    #[doc = "UID if provided by hardware (see uid2)"]
6348    pub uid: u64,
6349    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6350    pub flight_sw_version: u32,
6351    #[doc = "Middleware version number"]
6352    pub middleware_sw_version: u32,
6353    #[doc = "Operating system version number"]
6354    pub os_sw_version: u32,
6355    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6356    pub board_version: u32,
6357    #[doc = "ID of the board vendor"]
6358    pub vendor_id: u16,
6359    #[doc = "ID of the product"]
6360    pub product_id: u16,
6361    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6363    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6364    pub flight_custom_version: [u8; 8],
6365    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6368    pub middleware_custom_version: [u8; 8],
6369    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6370    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6371    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6372    pub os_custom_version: [u8; 8],
6373    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6374    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6375    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6376    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6377    pub uid2: [u8; 18],
6378}
6379impl AUTOPILOT_VERSION_DATA {
6380    pub const ENCODED_LEN: usize = 78usize;
6381    pub const DEFAULT: Self = Self {
6382        capabilities: MavProtocolCapability::DEFAULT,
6383        uid: 0_u64,
6384        flight_sw_version: 0_u32,
6385        middleware_sw_version: 0_u32,
6386        os_sw_version: 0_u32,
6387        board_version: 0_u32,
6388        vendor_id: 0_u16,
6389        product_id: 0_u16,
6390        flight_custom_version: [0_u8; 8usize],
6391        middleware_custom_version: [0_u8; 8usize],
6392        os_custom_version: [0_u8; 8usize],
6393        uid2: [0_u8; 18usize],
6394    };
6395    #[cfg(feature = "arbitrary")]
6396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6397        use arbitrary::{Arbitrary, Unstructured};
6398        let mut buf = [0u8; 1024];
6399        rng.fill_bytes(&mut buf);
6400        let mut unstructured = Unstructured::new(&buf);
6401        Self::arbitrary(&mut unstructured).unwrap_or_default()
6402    }
6403}
6404impl Default for AUTOPILOT_VERSION_DATA {
6405    fn default() -> Self {
6406        Self::DEFAULT.clone()
6407    }
6408}
6409impl MessageData for AUTOPILOT_VERSION_DATA {
6410    type Message = MavMessage;
6411    const ID: u32 = 148u32;
6412    const NAME: &'static str = "AUTOPILOT_VERSION";
6413    const EXTRA_CRC: u8 = 178u8;
6414    const ENCODED_LEN: usize = 78usize;
6415    fn deser(
6416        _version: MavlinkVersion,
6417        __input: &[u8],
6418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6419        let avail_len = __input.len();
6420        let mut payload_buf = [0; Self::ENCODED_LEN];
6421        let mut buf = if avail_len < Self::ENCODED_LEN {
6422            payload_buf[0..avail_len].copy_from_slice(__input);
6423            Bytes::new(&payload_buf)
6424        } else {
6425            Bytes::new(__input)
6426        };
6427        let mut __struct = Self::default();
6428        let tmp = buf.get_u64_le();
6429        __struct.capabilities = MavProtocolCapability::from_bits(
6430            tmp & MavProtocolCapability::all().bits(),
6431        )
6432        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6433            flag_type: "MavProtocolCapability",
6434            value: tmp as u32,
6435        })?;
6436        __struct.uid = buf.get_u64_le();
6437        __struct.flight_sw_version = buf.get_u32_le();
6438        __struct.middleware_sw_version = buf.get_u32_le();
6439        __struct.os_sw_version = buf.get_u32_le();
6440        __struct.board_version = buf.get_u32_le();
6441        __struct.vendor_id = buf.get_u16_le();
6442        __struct.product_id = buf.get_u16_le();
6443        for v in &mut __struct.flight_custom_version {
6444            let val = buf.get_u8();
6445            *v = val;
6446        }
6447        for v in &mut __struct.middleware_custom_version {
6448            let val = buf.get_u8();
6449            *v = val;
6450        }
6451        for v in &mut __struct.os_custom_version {
6452            let val = buf.get_u8();
6453            *v = val;
6454        }
6455        for v in &mut __struct.uid2 {
6456            let val = buf.get_u8();
6457            *v = val;
6458        }
6459        Ok(__struct)
6460    }
6461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6462        let mut __tmp = BytesMut::new(bytes);
6463        #[allow(clippy::absurd_extreme_comparisons)]
6464        #[allow(unused_comparisons)]
6465        if __tmp.remaining() < Self::ENCODED_LEN {
6466            panic!(
6467                "buffer is too small (need {} bytes, but got {})",
6468                Self::ENCODED_LEN,
6469                __tmp.remaining(),
6470            )
6471        }
6472        __tmp.put_u64_le(self.capabilities.bits());
6473        __tmp.put_u64_le(self.uid);
6474        __tmp.put_u32_le(self.flight_sw_version);
6475        __tmp.put_u32_le(self.middleware_sw_version);
6476        __tmp.put_u32_le(self.os_sw_version);
6477        __tmp.put_u32_le(self.board_version);
6478        __tmp.put_u16_le(self.vendor_id);
6479        __tmp.put_u16_le(self.product_id);
6480        for val in &self.flight_custom_version {
6481            __tmp.put_u8(*val);
6482        }
6483        for val in &self.middleware_custom_version {
6484            __tmp.put_u8(*val);
6485        }
6486        for val in &self.os_custom_version {
6487            __tmp.put_u8(*val);
6488        }
6489        if matches!(version, MavlinkVersion::V2) {
6490            for val in &self.uid2 {
6491                __tmp.put_u8(*val);
6492            }
6493            let len = __tmp.len();
6494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6495        } else {
6496            __tmp.len()
6497        }
6498    }
6499}
6500#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6501#[doc = ""]
6502#[doc = "ID: 435"]
6503#[derive(Debug, Clone, PartialEq)]
6504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6506#[cfg_attr(feature = "ts", derive(TS))]
6507#[cfg_attr(feature = "ts", ts(export))]
6508pub struct AVAILABLE_MODES_DATA {
6509    #[doc = "A bitfield for use for autopilot-specific flags"]
6510    pub custom_mode: u32,
6511    #[doc = "Mode properties."]
6512    pub properties: MavModeProperty,
6513    #[doc = "The total number of available modes for the current vehicle type."]
6514    pub number_modes: u8,
6515    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6516    pub mode_index: u8,
6517    #[doc = "Standard mode."]
6518    pub standard_mode: MavStandardMode,
6519    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6520    #[cfg_attr(feature = "ts", ts(type = "string"))]
6521    pub mode_name: CharArray<35>,
6522}
6523impl AVAILABLE_MODES_DATA {
6524    pub const ENCODED_LEN: usize = 46usize;
6525    pub const DEFAULT: Self = Self {
6526        custom_mode: 0_u32,
6527        properties: MavModeProperty::DEFAULT,
6528        number_modes: 0_u8,
6529        mode_index: 0_u8,
6530        standard_mode: MavStandardMode::DEFAULT,
6531        mode_name: CharArray::new([0_u8; 35usize]),
6532    };
6533    #[cfg(feature = "arbitrary")]
6534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6535        use arbitrary::{Arbitrary, Unstructured};
6536        let mut buf = [0u8; 1024];
6537        rng.fill_bytes(&mut buf);
6538        let mut unstructured = Unstructured::new(&buf);
6539        Self::arbitrary(&mut unstructured).unwrap_or_default()
6540    }
6541}
6542impl Default for AVAILABLE_MODES_DATA {
6543    fn default() -> Self {
6544        Self::DEFAULT.clone()
6545    }
6546}
6547impl MessageData for AVAILABLE_MODES_DATA {
6548    type Message = MavMessage;
6549    const ID: u32 = 435u32;
6550    const NAME: &'static str = "AVAILABLE_MODES";
6551    const EXTRA_CRC: u8 = 134u8;
6552    const ENCODED_LEN: usize = 46usize;
6553    fn deser(
6554        _version: MavlinkVersion,
6555        __input: &[u8],
6556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6557        let avail_len = __input.len();
6558        let mut payload_buf = [0; Self::ENCODED_LEN];
6559        let mut buf = if avail_len < Self::ENCODED_LEN {
6560            payload_buf[0..avail_len].copy_from_slice(__input);
6561            Bytes::new(&payload_buf)
6562        } else {
6563            Bytes::new(__input)
6564        };
6565        let mut __struct = Self::default();
6566        __struct.custom_mode = buf.get_u32_le();
6567        let tmp = buf.get_u32_le();
6568        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6569            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6570                flag_type: "MavModeProperty",
6571                value: tmp as u32,
6572            })?;
6573        __struct.number_modes = buf.get_u8();
6574        __struct.mode_index = buf.get_u8();
6575        let tmp = buf.get_u8();
6576        __struct.standard_mode =
6577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6578                enum_type: "MavStandardMode",
6579                value: tmp as u32,
6580            })?;
6581        let mut tmp = [0_u8; 35usize];
6582        for v in &mut tmp {
6583            *v = buf.get_u8();
6584        }
6585        __struct.mode_name = CharArray::new(tmp);
6586        Ok(__struct)
6587    }
6588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6589        let mut __tmp = BytesMut::new(bytes);
6590        #[allow(clippy::absurd_extreme_comparisons)]
6591        #[allow(unused_comparisons)]
6592        if __tmp.remaining() < Self::ENCODED_LEN {
6593            panic!(
6594                "buffer is too small (need {} bytes, but got {})",
6595                Self::ENCODED_LEN,
6596                __tmp.remaining(),
6597            )
6598        }
6599        __tmp.put_u32_le(self.custom_mode);
6600        __tmp.put_u32_le(self.properties.bits());
6601        __tmp.put_u8(self.number_modes);
6602        __tmp.put_u8(self.mode_index);
6603        __tmp.put_u8(self.standard_mode as u8);
6604        for val in &self.mode_name {
6605            __tmp.put_u8(*val);
6606        }
6607        if matches!(version, MavlinkVersion::V2) {
6608            let len = __tmp.len();
6609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6610        } else {
6611            __tmp.len()
6612        }
6613    }
6614}
6615#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6616#[doc = ""]
6617#[doc = "ID: 437"]
6618#[derive(Debug, Clone, PartialEq)]
6619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6621#[cfg_attr(feature = "ts", derive(TS))]
6622#[cfg_attr(feature = "ts", ts(export))]
6623pub struct AVAILABLE_MODES_MONITOR_DATA {
6624    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6625    pub seq: u8,
6626}
6627impl AVAILABLE_MODES_MONITOR_DATA {
6628    pub const ENCODED_LEN: usize = 1usize;
6629    pub const DEFAULT: Self = Self { seq: 0_u8 };
6630    #[cfg(feature = "arbitrary")]
6631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6632        use arbitrary::{Arbitrary, Unstructured};
6633        let mut buf = [0u8; 1024];
6634        rng.fill_bytes(&mut buf);
6635        let mut unstructured = Unstructured::new(&buf);
6636        Self::arbitrary(&mut unstructured).unwrap_or_default()
6637    }
6638}
6639impl Default for AVAILABLE_MODES_MONITOR_DATA {
6640    fn default() -> Self {
6641        Self::DEFAULT.clone()
6642    }
6643}
6644impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6645    type Message = MavMessage;
6646    const ID: u32 = 437u32;
6647    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6648    const EXTRA_CRC: u8 = 30u8;
6649    const ENCODED_LEN: usize = 1usize;
6650    fn deser(
6651        _version: MavlinkVersion,
6652        __input: &[u8],
6653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6654        let avail_len = __input.len();
6655        let mut payload_buf = [0; Self::ENCODED_LEN];
6656        let mut buf = if avail_len < Self::ENCODED_LEN {
6657            payload_buf[0..avail_len].copy_from_slice(__input);
6658            Bytes::new(&payload_buf)
6659        } else {
6660            Bytes::new(__input)
6661        };
6662        let mut __struct = Self::default();
6663        __struct.seq = buf.get_u8();
6664        Ok(__struct)
6665    }
6666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6667        let mut __tmp = BytesMut::new(bytes);
6668        #[allow(clippy::absurd_extreme_comparisons)]
6669        #[allow(unused_comparisons)]
6670        if __tmp.remaining() < Self::ENCODED_LEN {
6671            panic!(
6672                "buffer is too small (need {} bytes, but got {})",
6673                Self::ENCODED_LEN,
6674                __tmp.remaining(),
6675            )
6676        }
6677        __tmp.put_u8(self.seq);
6678        if matches!(version, MavlinkVersion::V2) {
6679            let len = __tmp.len();
6680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6681        } else {
6682            __tmp.len()
6683        }
6684    }
6685}
6686#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6687#[doc = ""]
6688#[doc = "ID: 372"]
6689#[derive(Debug, Clone, PartialEq)]
6690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6692#[cfg_attr(feature = "ts", derive(TS))]
6693#[cfg_attr(feature = "ts", ts(export))]
6694pub struct BATTERY_INFO_DATA {
6695    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6696    pub discharge_minimum_voltage: f32,
6697    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6698    pub charging_minimum_voltage: f32,
6699    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6700    pub resting_minimum_voltage: f32,
6701    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6702    pub charging_maximum_voltage: f32,
6703    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6704    pub charging_maximum_current: f32,
6705    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6706    pub nominal_voltage: f32,
6707    #[doc = "Maximum pack discharge current. 0: field not provided."]
6708    pub discharge_maximum_current: f32,
6709    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6710    pub discharge_maximum_burst_current: f32,
6711    #[doc = "Fully charged design capacity. 0: field not provided."]
6712    pub design_capacity: f32,
6713    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6714    pub full_charge_capacity: f32,
6715    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6716    pub cycle_count: u16,
6717    #[doc = "Battery weight. 0: field not provided."]
6718    pub weight: u16,
6719    #[doc = "Battery ID"]
6720    pub id: u8,
6721    #[doc = "Function of the battery."]
6722    pub battery_function: MavBatteryFunction,
6723    #[doc = "Type (chemistry) of the battery."]
6724    pub mavtype: MavBatteryType,
6725    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6726    pub state_of_health: u8,
6727    #[doc = "Number of battery cells in series. 0: field not provided."]
6728    pub cells_in_series: u8,
6729    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6730    #[cfg_attr(feature = "ts", ts(type = "string"))]
6731    pub manufacture_date: CharArray<9>,
6732    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6733    #[cfg_attr(feature = "ts", ts(type = "string"))]
6734    pub serial_number: CharArray<32>,
6735    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6736    #[cfg_attr(feature = "ts", ts(type = "string"))]
6737    pub name: CharArray<50>,
6738}
6739impl BATTERY_INFO_DATA {
6740    pub const ENCODED_LEN: usize = 140usize;
6741    pub const DEFAULT: Self = Self {
6742        discharge_minimum_voltage: 0.0_f32,
6743        charging_minimum_voltage: 0.0_f32,
6744        resting_minimum_voltage: 0.0_f32,
6745        charging_maximum_voltage: 0.0_f32,
6746        charging_maximum_current: 0.0_f32,
6747        nominal_voltage: 0.0_f32,
6748        discharge_maximum_current: 0.0_f32,
6749        discharge_maximum_burst_current: 0.0_f32,
6750        design_capacity: 0.0_f32,
6751        full_charge_capacity: 0.0_f32,
6752        cycle_count: 0_u16,
6753        weight: 0_u16,
6754        id: 0_u8,
6755        battery_function: MavBatteryFunction::DEFAULT,
6756        mavtype: MavBatteryType::DEFAULT,
6757        state_of_health: 0_u8,
6758        cells_in_series: 0_u8,
6759        manufacture_date: CharArray::new([0_u8; 9usize]),
6760        serial_number: CharArray::new([0_u8; 32usize]),
6761        name: CharArray::new([0_u8; 50usize]),
6762    };
6763    #[cfg(feature = "arbitrary")]
6764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6765        use arbitrary::{Arbitrary, Unstructured};
6766        let mut buf = [0u8; 1024];
6767        rng.fill_bytes(&mut buf);
6768        let mut unstructured = Unstructured::new(&buf);
6769        Self::arbitrary(&mut unstructured).unwrap_or_default()
6770    }
6771}
6772impl Default for BATTERY_INFO_DATA {
6773    fn default() -> Self {
6774        Self::DEFAULT.clone()
6775    }
6776}
6777impl MessageData for BATTERY_INFO_DATA {
6778    type Message = MavMessage;
6779    const ID: u32 = 372u32;
6780    const NAME: &'static str = "BATTERY_INFO";
6781    const EXTRA_CRC: u8 = 26u8;
6782    const ENCODED_LEN: usize = 140usize;
6783    fn deser(
6784        _version: MavlinkVersion,
6785        __input: &[u8],
6786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6787        let avail_len = __input.len();
6788        let mut payload_buf = [0; Self::ENCODED_LEN];
6789        let mut buf = if avail_len < Self::ENCODED_LEN {
6790            payload_buf[0..avail_len].copy_from_slice(__input);
6791            Bytes::new(&payload_buf)
6792        } else {
6793            Bytes::new(__input)
6794        };
6795        let mut __struct = Self::default();
6796        __struct.discharge_minimum_voltage = buf.get_f32_le();
6797        __struct.charging_minimum_voltage = buf.get_f32_le();
6798        __struct.resting_minimum_voltage = buf.get_f32_le();
6799        __struct.charging_maximum_voltage = buf.get_f32_le();
6800        __struct.charging_maximum_current = buf.get_f32_le();
6801        __struct.nominal_voltage = buf.get_f32_le();
6802        __struct.discharge_maximum_current = buf.get_f32_le();
6803        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6804        __struct.design_capacity = buf.get_f32_le();
6805        __struct.full_charge_capacity = buf.get_f32_le();
6806        __struct.cycle_count = buf.get_u16_le();
6807        __struct.weight = buf.get_u16_le();
6808        __struct.id = buf.get_u8();
6809        let tmp = buf.get_u8();
6810        __struct.battery_function =
6811            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6812                enum_type: "MavBatteryFunction",
6813                value: tmp as u32,
6814            })?;
6815        let tmp = buf.get_u8();
6816        __struct.mavtype =
6817            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6818                enum_type: "MavBatteryType",
6819                value: tmp as u32,
6820            })?;
6821        __struct.state_of_health = buf.get_u8();
6822        __struct.cells_in_series = buf.get_u8();
6823        let mut tmp = [0_u8; 9usize];
6824        for v in &mut tmp {
6825            *v = buf.get_u8();
6826        }
6827        __struct.manufacture_date = CharArray::new(tmp);
6828        let mut tmp = [0_u8; 32usize];
6829        for v in &mut tmp {
6830            *v = buf.get_u8();
6831        }
6832        __struct.serial_number = CharArray::new(tmp);
6833        let mut tmp = [0_u8; 50usize];
6834        for v in &mut tmp {
6835            *v = buf.get_u8();
6836        }
6837        __struct.name = CharArray::new(tmp);
6838        Ok(__struct)
6839    }
6840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6841        let mut __tmp = BytesMut::new(bytes);
6842        #[allow(clippy::absurd_extreme_comparisons)]
6843        #[allow(unused_comparisons)]
6844        if __tmp.remaining() < Self::ENCODED_LEN {
6845            panic!(
6846                "buffer is too small (need {} bytes, but got {})",
6847                Self::ENCODED_LEN,
6848                __tmp.remaining(),
6849            )
6850        }
6851        __tmp.put_f32_le(self.discharge_minimum_voltage);
6852        __tmp.put_f32_le(self.charging_minimum_voltage);
6853        __tmp.put_f32_le(self.resting_minimum_voltage);
6854        __tmp.put_f32_le(self.charging_maximum_voltage);
6855        __tmp.put_f32_le(self.charging_maximum_current);
6856        __tmp.put_f32_le(self.nominal_voltage);
6857        __tmp.put_f32_le(self.discharge_maximum_current);
6858        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6859        __tmp.put_f32_le(self.design_capacity);
6860        __tmp.put_f32_le(self.full_charge_capacity);
6861        __tmp.put_u16_le(self.cycle_count);
6862        __tmp.put_u16_le(self.weight);
6863        __tmp.put_u8(self.id);
6864        __tmp.put_u8(self.battery_function as u8);
6865        __tmp.put_u8(self.mavtype as u8);
6866        __tmp.put_u8(self.state_of_health);
6867        __tmp.put_u8(self.cells_in_series);
6868        for val in &self.manufacture_date {
6869            __tmp.put_u8(*val);
6870        }
6871        for val in &self.serial_number {
6872            __tmp.put_u8(*val);
6873        }
6874        for val in &self.name {
6875            __tmp.put_u8(*val);
6876        }
6877        if matches!(version, MavlinkVersion::V2) {
6878            let len = __tmp.len();
6879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6880        } else {
6881            __tmp.len()
6882        }
6883    }
6884}
6885#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6886#[doc = ""]
6887#[doc = "ID: 147"]
6888#[derive(Debug, Clone, PartialEq)]
6889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6891#[cfg_attr(feature = "ts", derive(TS))]
6892#[cfg_attr(feature = "ts", ts(export))]
6893pub struct BATTERY_STATUS_DATA {
6894    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6895    pub current_consumed: i32,
6896    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6897    pub energy_consumed: i32,
6898    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6899    pub temperature: i16,
6900    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6901    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6902    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6903    pub voltages: [u16; 10],
6904    #[doc = "Battery current, -1: autopilot does not measure the current"]
6905    pub current_battery: i16,
6906    #[doc = "Battery ID"]
6907    pub id: u8,
6908    #[doc = "Function of the battery"]
6909    pub battery_function: MavBatteryFunction,
6910    #[doc = "Type (chemistry) of the battery"]
6911    pub mavtype: MavBatteryType,
6912    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6913    pub battery_remaining: i8,
6914    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6915    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6916    pub time_remaining: i32,
6917    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6918    #[cfg_attr(feature = "serde", serde(default))]
6919    pub charge_state: MavBatteryChargeState,
6920    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6923    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6924    pub voltages_ext: [u16; 4],
6925    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6926    #[cfg_attr(feature = "serde", serde(default))]
6927    pub mode: MavBatteryMode,
6928    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6929    #[cfg_attr(feature = "serde", serde(default))]
6930    pub fault_bitmask: MavBatteryFault,
6931}
6932impl BATTERY_STATUS_DATA {
6933    pub const ENCODED_LEN: usize = 54usize;
6934    pub const DEFAULT: Self = Self {
6935        current_consumed: 0_i32,
6936        energy_consumed: 0_i32,
6937        temperature: 0_i16,
6938        voltages: [0_u16; 10usize],
6939        current_battery: 0_i16,
6940        id: 0_u8,
6941        battery_function: MavBatteryFunction::DEFAULT,
6942        mavtype: MavBatteryType::DEFAULT,
6943        battery_remaining: 0_i8,
6944        time_remaining: 0_i32,
6945        charge_state: MavBatteryChargeState::DEFAULT,
6946        voltages_ext: [0_u16; 4usize],
6947        mode: MavBatteryMode::DEFAULT,
6948        fault_bitmask: MavBatteryFault::DEFAULT,
6949    };
6950    #[cfg(feature = "arbitrary")]
6951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6952        use arbitrary::{Arbitrary, Unstructured};
6953        let mut buf = [0u8; 1024];
6954        rng.fill_bytes(&mut buf);
6955        let mut unstructured = Unstructured::new(&buf);
6956        Self::arbitrary(&mut unstructured).unwrap_or_default()
6957    }
6958}
6959impl Default for BATTERY_STATUS_DATA {
6960    fn default() -> Self {
6961        Self::DEFAULT.clone()
6962    }
6963}
6964impl MessageData for BATTERY_STATUS_DATA {
6965    type Message = MavMessage;
6966    const ID: u32 = 147u32;
6967    const NAME: &'static str = "BATTERY_STATUS";
6968    const EXTRA_CRC: u8 = 154u8;
6969    const ENCODED_LEN: usize = 54usize;
6970    fn deser(
6971        _version: MavlinkVersion,
6972        __input: &[u8],
6973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6974        let avail_len = __input.len();
6975        let mut payload_buf = [0; Self::ENCODED_LEN];
6976        let mut buf = if avail_len < Self::ENCODED_LEN {
6977            payload_buf[0..avail_len].copy_from_slice(__input);
6978            Bytes::new(&payload_buf)
6979        } else {
6980            Bytes::new(__input)
6981        };
6982        let mut __struct = Self::default();
6983        __struct.current_consumed = buf.get_i32_le();
6984        __struct.energy_consumed = buf.get_i32_le();
6985        __struct.temperature = buf.get_i16_le();
6986        for v in &mut __struct.voltages {
6987            let val = buf.get_u16_le();
6988            *v = val;
6989        }
6990        __struct.current_battery = buf.get_i16_le();
6991        __struct.id = buf.get_u8();
6992        let tmp = buf.get_u8();
6993        __struct.battery_function =
6994            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6995                enum_type: "MavBatteryFunction",
6996                value: tmp as u32,
6997            })?;
6998        let tmp = buf.get_u8();
6999        __struct.mavtype =
7000            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7001                enum_type: "MavBatteryType",
7002                value: tmp as u32,
7003            })?;
7004        __struct.battery_remaining = buf.get_i8();
7005        __struct.time_remaining = buf.get_i32_le();
7006        let tmp = buf.get_u8();
7007        __struct.charge_state =
7008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7009                enum_type: "MavBatteryChargeState",
7010                value: tmp as u32,
7011            })?;
7012        for v in &mut __struct.voltages_ext {
7013            let val = buf.get_u16_le();
7014            *v = val;
7015        }
7016        let tmp = buf.get_u8();
7017        __struct.mode =
7018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7019                enum_type: "MavBatteryMode",
7020                value: tmp as u32,
7021            })?;
7022        let tmp = buf.get_u32_le();
7023        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7024            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7025                flag_type: "MavBatteryFault",
7026                value: tmp as u32,
7027            })?;
7028        Ok(__struct)
7029    }
7030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7031        let mut __tmp = BytesMut::new(bytes);
7032        #[allow(clippy::absurd_extreme_comparisons)]
7033        #[allow(unused_comparisons)]
7034        if __tmp.remaining() < Self::ENCODED_LEN {
7035            panic!(
7036                "buffer is too small (need {} bytes, but got {})",
7037                Self::ENCODED_LEN,
7038                __tmp.remaining(),
7039            )
7040        }
7041        __tmp.put_i32_le(self.current_consumed);
7042        __tmp.put_i32_le(self.energy_consumed);
7043        __tmp.put_i16_le(self.temperature);
7044        for val in &self.voltages {
7045            __tmp.put_u16_le(*val);
7046        }
7047        __tmp.put_i16_le(self.current_battery);
7048        __tmp.put_u8(self.id);
7049        __tmp.put_u8(self.battery_function as u8);
7050        __tmp.put_u8(self.mavtype as u8);
7051        __tmp.put_i8(self.battery_remaining);
7052        if matches!(version, MavlinkVersion::V2) {
7053            __tmp.put_i32_le(self.time_remaining);
7054            __tmp.put_u8(self.charge_state as u8);
7055            for val in &self.voltages_ext {
7056                __tmp.put_u16_le(*val);
7057            }
7058            __tmp.put_u8(self.mode as u8);
7059            __tmp.put_u32_le(self.fault_bitmask.bits());
7060            let len = __tmp.len();
7061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7062        } else {
7063            __tmp.len()
7064        }
7065    }
7066}
7067#[doc = "Report button state change."]
7068#[doc = ""]
7069#[doc = "ID: 257"]
7070#[derive(Debug, Clone, PartialEq)]
7071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7073#[cfg_attr(feature = "ts", derive(TS))]
7074#[cfg_attr(feature = "ts", ts(export))]
7075pub struct BUTTON_CHANGE_DATA {
7076    #[doc = "Timestamp (time since system boot)."]
7077    pub time_boot_ms: u32,
7078    #[doc = "Time of last change of button state."]
7079    pub last_change_ms: u32,
7080    #[doc = "Bitmap for state of buttons."]
7081    pub state: u8,
7082}
7083impl BUTTON_CHANGE_DATA {
7084    pub const ENCODED_LEN: usize = 9usize;
7085    pub const DEFAULT: Self = Self {
7086        time_boot_ms: 0_u32,
7087        last_change_ms: 0_u32,
7088        state: 0_u8,
7089    };
7090    #[cfg(feature = "arbitrary")]
7091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7092        use arbitrary::{Arbitrary, Unstructured};
7093        let mut buf = [0u8; 1024];
7094        rng.fill_bytes(&mut buf);
7095        let mut unstructured = Unstructured::new(&buf);
7096        Self::arbitrary(&mut unstructured).unwrap_or_default()
7097    }
7098}
7099impl Default for BUTTON_CHANGE_DATA {
7100    fn default() -> Self {
7101        Self::DEFAULT.clone()
7102    }
7103}
7104impl MessageData for BUTTON_CHANGE_DATA {
7105    type Message = MavMessage;
7106    const ID: u32 = 257u32;
7107    const NAME: &'static str = "BUTTON_CHANGE";
7108    const EXTRA_CRC: u8 = 131u8;
7109    const ENCODED_LEN: usize = 9usize;
7110    fn deser(
7111        _version: MavlinkVersion,
7112        __input: &[u8],
7113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7114        let avail_len = __input.len();
7115        let mut payload_buf = [0; Self::ENCODED_LEN];
7116        let mut buf = if avail_len < Self::ENCODED_LEN {
7117            payload_buf[0..avail_len].copy_from_slice(__input);
7118            Bytes::new(&payload_buf)
7119        } else {
7120            Bytes::new(__input)
7121        };
7122        let mut __struct = Self::default();
7123        __struct.time_boot_ms = buf.get_u32_le();
7124        __struct.last_change_ms = buf.get_u32_le();
7125        __struct.state = buf.get_u8();
7126        Ok(__struct)
7127    }
7128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7129        let mut __tmp = BytesMut::new(bytes);
7130        #[allow(clippy::absurd_extreme_comparisons)]
7131        #[allow(unused_comparisons)]
7132        if __tmp.remaining() < Self::ENCODED_LEN {
7133            panic!(
7134                "buffer is too small (need {} bytes, but got {})",
7135                Self::ENCODED_LEN,
7136                __tmp.remaining(),
7137            )
7138        }
7139        __tmp.put_u32_le(self.time_boot_ms);
7140        __tmp.put_u32_le(self.last_change_ms);
7141        __tmp.put_u8(self.state);
7142        if matches!(version, MavlinkVersion::V2) {
7143            let len = __tmp.len();
7144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7145        } else {
7146            __tmp.len()
7147        }
7148    }
7149}
7150#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7151#[doc = ""]
7152#[doc = "ID: 262"]
7153#[derive(Debug, Clone, PartialEq)]
7154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7156#[cfg_attr(feature = "ts", derive(TS))]
7157#[cfg_attr(feature = "ts", ts(export))]
7158pub struct CAMERA_CAPTURE_STATUS_DATA {
7159    #[doc = "Timestamp (time since system boot)."]
7160    pub time_boot_ms: u32,
7161    #[doc = "Image capture interval"]
7162    pub image_interval: f32,
7163    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7164    pub recording_time_ms: u32,
7165    #[doc = "Available storage capacity."]
7166    pub available_capacity: f32,
7167    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7168    pub image_status: u8,
7169    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7170    pub video_status: u8,
7171    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7172    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7173    pub image_count: i32,
7174    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7175    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7176    pub camera_device_id: u8,
7177}
7178impl CAMERA_CAPTURE_STATUS_DATA {
7179    pub const ENCODED_LEN: usize = 23usize;
7180    pub const DEFAULT: Self = Self {
7181        time_boot_ms: 0_u32,
7182        image_interval: 0.0_f32,
7183        recording_time_ms: 0_u32,
7184        available_capacity: 0.0_f32,
7185        image_status: 0_u8,
7186        video_status: 0_u8,
7187        image_count: 0_i32,
7188        camera_device_id: 0_u8,
7189    };
7190    #[cfg(feature = "arbitrary")]
7191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7192        use arbitrary::{Arbitrary, Unstructured};
7193        let mut buf = [0u8; 1024];
7194        rng.fill_bytes(&mut buf);
7195        let mut unstructured = Unstructured::new(&buf);
7196        Self::arbitrary(&mut unstructured).unwrap_or_default()
7197    }
7198}
7199impl Default for CAMERA_CAPTURE_STATUS_DATA {
7200    fn default() -> Self {
7201        Self::DEFAULT.clone()
7202    }
7203}
7204impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7205    type Message = MavMessage;
7206    const ID: u32 = 262u32;
7207    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7208    const EXTRA_CRC: u8 = 12u8;
7209    const ENCODED_LEN: usize = 23usize;
7210    fn deser(
7211        _version: MavlinkVersion,
7212        __input: &[u8],
7213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7214        let avail_len = __input.len();
7215        let mut payload_buf = [0; Self::ENCODED_LEN];
7216        let mut buf = if avail_len < Self::ENCODED_LEN {
7217            payload_buf[0..avail_len].copy_from_slice(__input);
7218            Bytes::new(&payload_buf)
7219        } else {
7220            Bytes::new(__input)
7221        };
7222        let mut __struct = Self::default();
7223        __struct.time_boot_ms = buf.get_u32_le();
7224        __struct.image_interval = buf.get_f32_le();
7225        __struct.recording_time_ms = buf.get_u32_le();
7226        __struct.available_capacity = buf.get_f32_le();
7227        __struct.image_status = buf.get_u8();
7228        __struct.video_status = buf.get_u8();
7229        __struct.image_count = buf.get_i32_le();
7230        __struct.camera_device_id = buf.get_u8();
7231        Ok(__struct)
7232    }
7233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7234        let mut __tmp = BytesMut::new(bytes);
7235        #[allow(clippy::absurd_extreme_comparisons)]
7236        #[allow(unused_comparisons)]
7237        if __tmp.remaining() < Self::ENCODED_LEN {
7238            panic!(
7239                "buffer is too small (need {} bytes, but got {})",
7240                Self::ENCODED_LEN,
7241                __tmp.remaining(),
7242            )
7243        }
7244        __tmp.put_u32_le(self.time_boot_ms);
7245        __tmp.put_f32_le(self.image_interval);
7246        __tmp.put_u32_le(self.recording_time_ms);
7247        __tmp.put_f32_le(self.available_capacity);
7248        __tmp.put_u8(self.image_status);
7249        __tmp.put_u8(self.video_status);
7250        if matches!(version, MavlinkVersion::V2) {
7251            __tmp.put_i32_le(self.image_count);
7252            __tmp.put_u8(self.camera_device_id);
7253            let len = __tmp.len();
7254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7255        } else {
7256            __tmp.len()
7257        }
7258    }
7259}
7260#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7261#[doc = ""]
7262#[doc = "ID: 271"]
7263#[derive(Debug, Clone, PartialEq)]
7264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7266#[cfg_attr(feature = "ts", derive(TS))]
7267#[cfg_attr(feature = "ts", ts(export))]
7268pub struct CAMERA_FOV_STATUS_DATA {
7269    #[doc = "Timestamp (time since system boot)."]
7270    pub time_boot_ms: u32,
7271    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7272    pub lat_camera: i32,
7273    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7274    pub lon_camera: i32,
7275    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7276    pub alt_camera: i32,
7277    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7278    pub lat_image: i32,
7279    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7280    pub lon_image: i32,
7281    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7282    pub alt_image: i32,
7283    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7284    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7285    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7286    pub q: [f32; 4],
7287    #[doc = "Horizontal field of view (NaN if unknown)."]
7288    pub hfov: f32,
7289    #[doc = "Vertical field of view (NaN if unknown)."]
7290    pub vfov: f32,
7291    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7292    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7293    pub camera_device_id: u8,
7294}
7295impl CAMERA_FOV_STATUS_DATA {
7296    pub const ENCODED_LEN: usize = 53usize;
7297    pub const DEFAULT: Self = Self {
7298        time_boot_ms: 0_u32,
7299        lat_camera: 0_i32,
7300        lon_camera: 0_i32,
7301        alt_camera: 0_i32,
7302        lat_image: 0_i32,
7303        lon_image: 0_i32,
7304        alt_image: 0_i32,
7305        q: [0.0_f32; 4usize],
7306        hfov: 0.0_f32,
7307        vfov: 0.0_f32,
7308        camera_device_id: 0_u8,
7309    };
7310    #[cfg(feature = "arbitrary")]
7311    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7312        use arbitrary::{Arbitrary, Unstructured};
7313        let mut buf = [0u8; 1024];
7314        rng.fill_bytes(&mut buf);
7315        let mut unstructured = Unstructured::new(&buf);
7316        Self::arbitrary(&mut unstructured).unwrap_or_default()
7317    }
7318}
7319impl Default for CAMERA_FOV_STATUS_DATA {
7320    fn default() -> Self {
7321        Self::DEFAULT.clone()
7322    }
7323}
7324impl MessageData for CAMERA_FOV_STATUS_DATA {
7325    type Message = MavMessage;
7326    const ID: u32 = 271u32;
7327    const NAME: &'static str = "CAMERA_FOV_STATUS";
7328    const EXTRA_CRC: u8 = 22u8;
7329    const ENCODED_LEN: usize = 53usize;
7330    fn deser(
7331        _version: MavlinkVersion,
7332        __input: &[u8],
7333    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7334        let avail_len = __input.len();
7335        let mut payload_buf = [0; Self::ENCODED_LEN];
7336        let mut buf = if avail_len < Self::ENCODED_LEN {
7337            payload_buf[0..avail_len].copy_from_slice(__input);
7338            Bytes::new(&payload_buf)
7339        } else {
7340            Bytes::new(__input)
7341        };
7342        let mut __struct = Self::default();
7343        __struct.time_boot_ms = buf.get_u32_le();
7344        __struct.lat_camera = buf.get_i32_le();
7345        __struct.lon_camera = buf.get_i32_le();
7346        __struct.alt_camera = buf.get_i32_le();
7347        __struct.lat_image = buf.get_i32_le();
7348        __struct.lon_image = buf.get_i32_le();
7349        __struct.alt_image = buf.get_i32_le();
7350        for v in &mut __struct.q {
7351            let val = buf.get_f32_le();
7352            *v = val;
7353        }
7354        __struct.hfov = buf.get_f32_le();
7355        __struct.vfov = buf.get_f32_le();
7356        __struct.camera_device_id = buf.get_u8();
7357        Ok(__struct)
7358    }
7359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7360        let mut __tmp = BytesMut::new(bytes);
7361        #[allow(clippy::absurd_extreme_comparisons)]
7362        #[allow(unused_comparisons)]
7363        if __tmp.remaining() < Self::ENCODED_LEN {
7364            panic!(
7365                "buffer is too small (need {} bytes, but got {})",
7366                Self::ENCODED_LEN,
7367                __tmp.remaining(),
7368            )
7369        }
7370        __tmp.put_u32_le(self.time_boot_ms);
7371        __tmp.put_i32_le(self.lat_camera);
7372        __tmp.put_i32_le(self.lon_camera);
7373        __tmp.put_i32_le(self.alt_camera);
7374        __tmp.put_i32_le(self.lat_image);
7375        __tmp.put_i32_le(self.lon_image);
7376        __tmp.put_i32_le(self.alt_image);
7377        for val in &self.q {
7378            __tmp.put_f32_le(*val);
7379        }
7380        __tmp.put_f32_le(self.hfov);
7381        __tmp.put_f32_le(self.vfov);
7382        if matches!(version, MavlinkVersion::V2) {
7383            __tmp.put_u8(self.camera_device_id);
7384            let len = __tmp.len();
7385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7386        } else {
7387            __tmp.len()
7388        }
7389    }
7390}
7391#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7392#[doc = ""]
7393#[doc = "ID: 263"]
7394#[derive(Debug, Clone, PartialEq)]
7395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7397#[cfg_attr(feature = "ts", derive(TS))]
7398#[cfg_attr(feature = "ts", ts(export))]
7399pub struct CAMERA_IMAGE_CAPTURED_DATA {
7400    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7401    pub time_utc: u64,
7402    #[doc = "Timestamp (time since system boot)."]
7403    pub time_boot_ms: u32,
7404    #[doc = "Latitude where image was taken"]
7405    pub lat: i32,
7406    #[doc = "Longitude where capture was taken"]
7407    pub lon: i32,
7408    #[doc = "Altitude (MSL) where image was taken"]
7409    pub alt: i32,
7410    #[doc = "Altitude above ground"]
7411    pub relative_alt: i32,
7412    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7415    pub q: [f32; 4],
7416    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7417    pub image_index: i32,
7418    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7419    pub camera_id: u8,
7420    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7421    pub capture_result: i8,
7422    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7423    #[cfg_attr(feature = "ts", ts(type = "string"))]
7424    pub file_url: CharArray<205>,
7425}
7426impl CAMERA_IMAGE_CAPTURED_DATA {
7427    pub const ENCODED_LEN: usize = 255usize;
7428    pub const DEFAULT: Self = Self {
7429        time_utc: 0_u64,
7430        time_boot_ms: 0_u32,
7431        lat: 0_i32,
7432        lon: 0_i32,
7433        alt: 0_i32,
7434        relative_alt: 0_i32,
7435        q: [0.0_f32; 4usize],
7436        image_index: 0_i32,
7437        camera_id: 0_u8,
7438        capture_result: 0_i8,
7439        file_url: CharArray::new([0_u8; 205usize]),
7440    };
7441    #[cfg(feature = "arbitrary")]
7442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7443        use arbitrary::{Arbitrary, Unstructured};
7444        let mut buf = [0u8; 1024];
7445        rng.fill_bytes(&mut buf);
7446        let mut unstructured = Unstructured::new(&buf);
7447        Self::arbitrary(&mut unstructured).unwrap_or_default()
7448    }
7449}
7450impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7451    fn default() -> Self {
7452        Self::DEFAULT.clone()
7453    }
7454}
7455impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7456    type Message = MavMessage;
7457    const ID: u32 = 263u32;
7458    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7459    const EXTRA_CRC: u8 = 133u8;
7460    const ENCODED_LEN: usize = 255usize;
7461    fn deser(
7462        _version: MavlinkVersion,
7463        __input: &[u8],
7464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7465        let avail_len = __input.len();
7466        let mut payload_buf = [0; Self::ENCODED_LEN];
7467        let mut buf = if avail_len < Self::ENCODED_LEN {
7468            payload_buf[0..avail_len].copy_from_slice(__input);
7469            Bytes::new(&payload_buf)
7470        } else {
7471            Bytes::new(__input)
7472        };
7473        let mut __struct = Self::default();
7474        __struct.time_utc = buf.get_u64_le();
7475        __struct.time_boot_ms = buf.get_u32_le();
7476        __struct.lat = buf.get_i32_le();
7477        __struct.lon = buf.get_i32_le();
7478        __struct.alt = buf.get_i32_le();
7479        __struct.relative_alt = buf.get_i32_le();
7480        for v in &mut __struct.q {
7481            let val = buf.get_f32_le();
7482            *v = val;
7483        }
7484        __struct.image_index = buf.get_i32_le();
7485        __struct.camera_id = buf.get_u8();
7486        __struct.capture_result = buf.get_i8();
7487        let mut tmp = [0_u8; 205usize];
7488        for v in &mut tmp {
7489            *v = buf.get_u8();
7490        }
7491        __struct.file_url = CharArray::new(tmp);
7492        Ok(__struct)
7493    }
7494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7495        let mut __tmp = BytesMut::new(bytes);
7496        #[allow(clippy::absurd_extreme_comparisons)]
7497        #[allow(unused_comparisons)]
7498        if __tmp.remaining() < Self::ENCODED_LEN {
7499            panic!(
7500                "buffer is too small (need {} bytes, but got {})",
7501                Self::ENCODED_LEN,
7502                __tmp.remaining(),
7503            )
7504        }
7505        __tmp.put_u64_le(self.time_utc);
7506        __tmp.put_u32_le(self.time_boot_ms);
7507        __tmp.put_i32_le(self.lat);
7508        __tmp.put_i32_le(self.lon);
7509        __tmp.put_i32_le(self.alt);
7510        __tmp.put_i32_le(self.relative_alt);
7511        for val in &self.q {
7512            __tmp.put_f32_le(*val);
7513        }
7514        __tmp.put_i32_le(self.image_index);
7515        __tmp.put_u8(self.camera_id);
7516        __tmp.put_i8(self.capture_result);
7517        for val in &self.file_url {
7518            __tmp.put_u8(*val);
7519        }
7520        if matches!(version, MavlinkVersion::V2) {
7521            let len = __tmp.len();
7522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7523        } else {
7524            __tmp.len()
7525        }
7526    }
7527}
7528#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7529#[doc = ""]
7530#[doc = "ID: 259"]
7531#[derive(Debug, Clone, PartialEq)]
7532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7534#[cfg_attr(feature = "ts", derive(TS))]
7535#[cfg_attr(feature = "ts", ts(export))]
7536pub struct CAMERA_INFORMATION_DATA {
7537    #[doc = "Timestamp (time since system boot)."]
7538    pub time_boot_ms: u32,
7539    #[doc = "0xff). Use 0 if not known."]
7540    pub firmware_version: u32,
7541    #[doc = "Focal length. Use NaN if not known."]
7542    pub focal_length: f32,
7543    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7544    pub sensor_size_h: f32,
7545    #[doc = "Image sensor size vertical. Use NaN if not known."]
7546    pub sensor_size_v: f32,
7547    #[doc = "Bitmap of camera capability flags."]
7548    pub flags: CameraCapFlags,
7549    #[doc = "Horizontal image resolution. Use 0 if not known."]
7550    pub resolution_h: u16,
7551    #[doc = "Vertical image resolution. Use 0 if not known."]
7552    pub resolution_v: u16,
7553    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7554    pub cam_definition_version: u16,
7555    #[doc = "Name of the camera vendor"]
7556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7557    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7558    pub vendor_name: [u8; 32],
7559    #[doc = "Name of the camera model"]
7560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7562    pub model_name: [u8; 32],
7563    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7564    pub lens_id: u8,
7565    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7566    #[cfg_attr(feature = "ts", ts(type = "string"))]
7567    pub cam_definition_uri: CharArray<140>,
7568    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7569    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7570    pub gimbal_device_id: u8,
7571    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7572    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7573    pub camera_device_id: u8,
7574}
7575impl CAMERA_INFORMATION_DATA {
7576    pub const ENCODED_LEN: usize = 237usize;
7577    pub const DEFAULT: Self = Self {
7578        time_boot_ms: 0_u32,
7579        firmware_version: 0_u32,
7580        focal_length: 0.0_f32,
7581        sensor_size_h: 0.0_f32,
7582        sensor_size_v: 0.0_f32,
7583        flags: CameraCapFlags::DEFAULT,
7584        resolution_h: 0_u16,
7585        resolution_v: 0_u16,
7586        cam_definition_version: 0_u16,
7587        vendor_name: [0_u8; 32usize],
7588        model_name: [0_u8; 32usize],
7589        lens_id: 0_u8,
7590        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7591        gimbal_device_id: 0_u8,
7592        camera_device_id: 0_u8,
7593    };
7594    #[cfg(feature = "arbitrary")]
7595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7596        use arbitrary::{Arbitrary, Unstructured};
7597        let mut buf = [0u8; 1024];
7598        rng.fill_bytes(&mut buf);
7599        let mut unstructured = Unstructured::new(&buf);
7600        Self::arbitrary(&mut unstructured).unwrap_or_default()
7601    }
7602}
7603impl Default for CAMERA_INFORMATION_DATA {
7604    fn default() -> Self {
7605        Self::DEFAULT.clone()
7606    }
7607}
7608impl MessageData for CAMERA_INFORMATION_DATA {
7609    type Message = MavMessage;
7610    const ID: u32 = 259u32;
7611    const NAME: &'static str = "CAMERA_INFORMATION";
7612    const EXTRA_CRC: u8 = 92u8;
7613    const ENCODED_LEN: usize = 237usize;
7614    fn deser(
7615        _version: MavlinkVersion,
7616        __input: &[u8],
7617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7618        let avail_len = __input.len();
7619        let mut payload_buf = [0; Self::ENCODED_LEN];
7620        let mut buf = if avail_len < Self::ENCODED_LEN {
7621            payload_buf[0..avail_len].copy_from_slice(__input);
7622            Bytes::new(&payload_buf)
7623        } else {
7624            Bytes::new(__input)
7625        };
7626        let mut __struct = Self::default();
7627        __struct.time_boot_ms = buf.get_u32_le();
7628        __struct.firmware_version = buf.get_u32_le();
7629        __struct.focal_length = buf.get_f32_le();
7630        __struct.sensor_size_h = buf.get_f32_le();
7631        __struct.sensor_size_v = buf.get_f32_le();
7632        let tmp = buf.get_u32_le();
7633        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7634            ::mavlink_core::error::ParserError::InvalidFlag {
7635                flag_type: "CameraCapFlags",
7636                value: tmp as u32,
7637            },
7638        )?;
7639        __struct.resolution_h = buf.get_u16_le();
7640        __struct.resolution_v = buf.get_u16_le();
7641        __struct.cam_definition_version = buf.get_u16_le();
7642        for v in &mut __struct.vendor_name {
7643            let val = buf.get_u8();
7644            *v = val;
7645        }
7646        for v in &mut __struct.model_name {
7647            let val = buf.get_u8();
7648            *v = val;
7649        }
7650        __struct.lens_id = buf.get_u8();
7651        let mut tmp = [0_u8; 140usize];
7652        for v in &mut tmp {
7653            *v = buf.get_u8();
7654        }
7655        __struct.cam_definition_uri = CharArray::new(tmp);
7656        __struct.gimbal_device_id = buf.get_u8();
7657        __struct.camera_device_id = buf.get_u8();
7658        Ok(__struct)
7659    }
7660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7661        let mut __tmp = BytesMut::new(bytes);
7662        #[allow(clippy::absurd_extreme_comparisons)]
7663        #[allow(unused_comparisons)]
7664        if __tmp.remaining() < Self::ENCODED_LEN {
7665            panic!(
7666                "buffer is too small (need {} bytes, but got {})",
7667                Self::ENCODED_LEN,
7668                __tmp.remaining(),
7669            )
7670        }
7671        __tmp.put_u32_le(self.time_boot_ms);
7672        __tmp.put_u32_le(self.firmware_version);
7673        __tmp.put_f32_le(self.focal_length);
7674        __tmp.put_f32_le(self.sensor_size_h);
7675        __tmp.put_f32_le(self.sensor_size_v);
7676        __tmp.put_u32_le(self.flags.bits());
7677        __tmp.put_u16_le(self.resolution_h);
7678        __tmp.put_u16_le(self.resolution_v);
7679        __tmp.put_u16_le(self.cam_definition_version);
7680        for val in &self.vendor_name {
7681            __tmp.put_u8(*val);
7682        }
7683        for val in &self.model_name {
7684            __tmp.put_u8(*val);
7685        }
7686        __tmp.put_u8(self.lens_id);
7687        for val in &self.cam_definition_uri {
7688            __tmp.put_u8(*val);
7689        }
7690        if matches!(version, MavlinkVersion::V2) {
7691            __tmp.put_u8(self.gimbal_device_id);
7692            __tmp.put_u8(self.camera_device_id);
7693            let len = __tmp.len();
7694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7695        } else {
7696            __tmp.len()
7697        }
7698    }
7699}
7700#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7701#[doc = ""]
7702#[doc = "ID: 260"]
7703#[derive(Debug, Clone, PartialEq)]
7704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7706#[cfg_attr(feature = "ts", derive(TS))]
7707#[cfg_attr(feature = "ts", ts(export))]
7708pub struct CAMERA_SETTINGS_DATA {
7709    #[doc = "Timestamp (time since system boot)."]
7710    pub time_boot_ms: u32,
7711    #[doc = "Camera mode"]
7712    pub mode_id: CameraMode,
7713    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7715    pub zoomLevel: f32,
7716    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7718    pub focusLevel: f32,
7719    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7721    pub camera_device_id: u8,
7722}
7723impl CAMERA_SETTINGS_DATA {
7724    pub const ENCODED_LEN: usize = 14usize;
7725    pub const DEFAULT: Self = Self {
7726        time_boot_ms: 0_u32,
7727        mode_id: CameraMode::DEFAULT,
7728        zoomLevel: 0.0_f32,
7729        focusLevel: 0.0_f32,
7730        camera_device_id: 0_u8,
7731    };
7732    #[cfg(feature = "arbitrary")]
7733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7734        use arbitrary::{Arbitrary, Unstructured};
7735        let mut buf = [0u8; 1024];
7736        rng.fill_bytes(&mut buf);
7737        let mut unstructured = Unstructured::new(&buf);
7738        Self::arbitrary(&mut unstructured).unwrap_or_default()
7739    }
7740}
7741impl Default for CAMERA_SETTINGS_DATA {
7742    fn default() -> Self {
7743        Self::DEFAULT.clone()
7744    }
7745}
7746impl MessageData for CAMERA_SETTINGS_DATA {
7747    type Message = MavMessage;
7748    const ID: u32 = 260u32;
7749    const NAME: &'static str = "CAMERA_SETTINGS";
7750    const EXTRA_CRC: u8 = 146u8;
7751    const ENCODED_LEN: usize = 14usize;
7752    fn deser(
7753        _version: MavlinkVersion,
7754        __input: &[u8],
7755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7756        let avail_len = __input.len();
7757        let mut payload_buf = [0; Self::ENCODED_LEN];
7758        let mut buf = if avail_len < Self::ENCODED_LEN {
7759            payload_buf[0..avail_len].copy_from_slice(__input);
7760            Bytes::new(&payload_buf)
7761        } else {
7762            Bytes::new(__input)
7763        };
7764        let mut __struct = Self::default();
7765        __struct.time_boot_ms = buf.get_u32_le();
7766        let tmp = buf.get_u8();
7767        __struct.mode_id =
7768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7769                enum_type: "CameraMode",
7770                value: tmp as u32,
7771            })?;
7772        __struct.zoomLevel = buf.get_f32_le();
7773        __struct.focusLevel = buf.get_f32_le();
7774        __struct.camera_device_id = buf.get_u8();
7775        Ok(__struct)
7776    }
7777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7778        let mut __tmp = BytesMut::new(bytes);
7779        #[allow(clippy::absurd_extreme_comparisons)]
7780        #[allow(unused_comparisons)]
7781        if __tmp.remaining() < Self::ENCODED_LEN {
7782            panic!(
7783                "buffer is too small (need {} bytes, but got {})",
7784                Self::ENCODED_LEN,
7785                __tmp.remaining(),
7786            )
7787        }
7788        __tmp.put_u32_le(self.time_boot_ms);
7789        __tmp.put_u8(self.mode_id as u8);
7790        if matches!(version, MavlinkVersion::V2) {
7791            __tmp.put_f32_le(self.zoomLevel);
7792            __tmp.put_f32_le(self.focusLevel);
7793            __tmp.put_u8(self.camera_device_id);
7794            let len = __tmp.len();
7795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7796        } else {
7797            __tmp.len()
7798        }
7799    }
7800}
7801#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7802#[doc = ""]
7803#[doc = "ID: 277"]
7804#[derive(Debug, Clone, PartialEq)]
7805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7807#[cfg_attr(feature = "ts", derive(TS))]
7808#[cfg_attr(feature = "ts", ts(export))]
7809pub struct CAMERA_THERMAL_RANGE_DATA {
7810    #[doc = "Timestamp (time since system boot)."]
7811    pub time_boot_ms: u32,
7812    #[doc = "Temperature max."]
7813    pub max: f32,
7814    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7815    pub max_point_x: f32,
7816    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7817    pub max_point_y: f32,
7818    #[doc = "Temperature min."]
7819    pub min: f32,
7820    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7821    pub min_point_x: f32,
7822    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7823    pub min_point_y: f32,
7824    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7825    pub stream_id: u8,
7826    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7827    pub camera_device_id: u8,
7828}
7829impl CAMERA_THERMAL_RANGE_DATA {
7830    pub const ENCODED_LEN: usize = 30usize;
7831    pub const DEFAULT: Self = Self {
7832        time_boot_ms: 0_u32,
7833        max: 0.0_f32,
7834        max_point_x: 0.0_f32,
7835        max_point_y: 0.0_f32,
7836        min: 0.0_f32,
7837        min_point_x: 0.0_f32,
7838        min_point_y: 0.0_f32,
7839        stream_id: 0_u8,
7840        camera_device_id: 0_u8,
7841    };
7842    #[cfg(feature = "arbitrary")]
7843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7844        use arbitrary::{Arbitrary, Unstructured};
7845        let mut buf = [0u8; 1024];
7846        rng.fill_bytes(&mut buf);
7847        let mut unstructured = Unstructured::new(&buf);
7848        Self::arbitrary(&mut unstructured).unwrap_or_default()
7849    }
7850}
7851impl Default for CAMERA_THERMAL_RANGE_DATA {
7852    fn default() -> Self {
7853        Self::DEFAULT.clone()
7854    }
7855}
7856impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7857    type Message = MavMessage;
7858    const ID: u32 = 277u32;
7859    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7860    const EXTRA_CRC: u8 = 62u8;
7861    const ENCODED_LEN: usize = 30usize;
7862    fn deser(
7863        _version: MavlinkVersion,
7864        __input: &[u8],
7865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7866        let avail_len = __input.len();
7867        let mut payload_buf = [0; Self::ENCODED_LEN];
7868        let mut buf = if avail_len < Self::ENCODED_LEN {
7869            payload_buf[0..avail_len].copy_from_slice(__input);
7870            Bytes::new(&payload_buf)
7871        } else {
7872            Bytes::new(__input)
7873        };
7874        let mut __struct = Self::default();
7875        __struct.time_boot_ms = buf.get_u32_le();
7876        __struct.max = buf.get_f32_le();
7877        __struct.max_point_x = buf.get_f32_le();
7878        __struct.max_point_y = buf.get_f32_le();
7879        __struct.min = buf.get_f32_le();
7880        __struct.min_point_x = buf.get_f32_le();
7881        __struct.min_point_y = buf.get_f32_le();
7882        __struct.stream_id = buf.get_u8();
7883        __struct.camera_device_id = buf.get_u8();
7884        Ok(__struct)
7885    }
7886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7887        let mut __tmp = BytesMut::new(bytes);
7888        #[allow(clippy::absurd_extreme_comparisons)]
7889        #[allow(unused_comparisons)]
7890        if __tmp.remaining() < Self::ENCODED_LEN {
7891            panic!(
7892                "buffer is too small (need {} bytes, but got {})",
7893                Self::ENCODED_LEN,
7894                __tmp.remaining(),
7895            )
7896        }
7897        __tmp.put_u32_le(self.time_boot_ms);
7898        __tmp.put_f32_le(self.max);
7899        __tmp.put_f32_le(self.max_point_x);
7900        __tmp.put_f32_le(self.max_point_y);
7901        __tmp.put_f32_le(self.min);
7902        __tmp.put_f32_le(self.min_point_x);
7903        __tmp.put_f32_le(self.min_point_y);
7904        __tmp.put_u8(self.stream_id);
7905        __tmp.put_u8(self.camera_device_id);
7906        if matches!(version, MavlinkVersion::V2) {
7907            let len = __tmp.len();
7908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7909        } else {
7910            __tmp.len()
7911        }
7912    }
7913}
7914#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7915#[doc = ""]
7916#[doc = "ID: 276"]
7917#[derive(Debug, Clone, PartialEq)]
7918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7920#[cfg_attr(feature = "ts", derive(TS))]
7921#[cfg_attr(feature = "ts", ts(export))]
7922pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7923    #[doc = "Latitude of tracked object"]
7924    pub lat: i32,
7925    #[doc = "Longitude of tracked object"]
7926    pub lon: i32,
7927    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7928    pub alt: f32,
7929    #[doc = "Horizontal accuracy. NAN if unknown"]
7930    pub h_acc: f32,
7931    #[doc = "Vertical accuracy. NAN if unknown"]
7932    pub v_acc: f32,
7933    #[doc = "North velocity of tracked object. NAN if unknown"]
7934    pub vel_n: f32,
7935    #[doc = "East velocity of tracked object. NAN if unknown"]
7936    pub vel_e: f32,
7937    #[doc = "Down velocity of tracked object. NAN if unknown"]
7938    pub vel_d: f32,
7939    #[doc = "Velocity accuracy. NAN if unknown"]
7940    pub vel_acc: f32,
7941    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7942    pub dist: f32,
7943    #[doc = "Heading in radians, in NED. NAN if unknown"]
7944    pub hdg: f32,
7945    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7946    pub hdg_acc: f32,
7947    #[doc = "Current tracking status"]
7948    pub tracking_status: CameraTrackingStatusFlags,
7949    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7950    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7951    pub camera_device_id: u8,
7952}
7953impl CAMERA_TRACKING_GEO_STATUS_DATA {
7954    pub const ENCODED_LEN: usize = 50usize;
7955    pub const DEFAULT: Self = Self {
7956        lat: 0_i32,
7957        lon: 0_i32,
7958        alt: 0.0_f32,
7959        h_acc: 0.0_f32,
7960        v_acc: 0.0_f32,
7961        vel_n: 0.0_f32,
7962        vel_e: 0.0_f32,
7963        vel_d: 0.0_f32,
7964        vel_acc: 0.0_f32,
7965        dist: 0.0_f32,
7966        hdg: 0.0_f32,
7967        hdg_acc: 0.0_f32,
7968        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7969        camera_device_id: 0_u8,
7970    };
7971    #[cfg(feature = "arbitrary")]
7972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7973        use arbitrary::{Arbitrary, Unstructured};
7974        let mut buf = [0u8; 1024];
7975        rng.fill_bytes(&mut buf);
7976        let mut unstructured = Unstructured::new(&buf);
7977        Self::arbitrary(&mut unstructured).unwrap_or_default()
7978    }
7979}
7980impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7981    fn default() -> Self {
7982        Self::DEFAULT.clone()
7983    }
7984}
7985impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7986    type Message = MavMessage;
7987    const ID: u32 = 276u32;
7988    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7989    const EXTRA_CRC: u8 = 18u8;
7990    const ENCODED_LEN: usize = 50usize;
7991    fn deser(
7992        _version: MavlinkVersion,
7993        __input: &[u8],
7994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7995        let avail_len = __input.len();
7996        let mut payload_buf = [0; Self::ENCODED_LEN];
7997        let mut buf = if avail_len < Self::ENCODED_LEN {
7998            payload_buf[0..avail_len].copy_from_slice(__input);
7999            Bytes::new(&payload_buf)
8000        } else {
8001            Bytes::new(__input)
8002        };
8003        let mut __struct = Self::default();
8004        __struct.lat = buf.get_i32_le();
8005        __struct.lon = buf.get_i32_le();
8006        __struct.alt = buf.get_f32_le();
8007        __struct.h_acc = buf.get_f32_le();
8008        __struct.v_acc = buf.get_f32_le();
8009        __struct.vel_n = buf.get_f32_le();
8010        __struct.vel_e = buf.get_f32_le();
8011        __struct.vel_d = buf.get_f32_le();
8012        __struct.vel_acc = buf.get_f32_le();
8013        __struct.dist = buf.get_f32_le();
8014        __struct.hdg = buf.get_f32_le();
8015        __struct.hdg_acc = buf.get_f32_le();
8016        let tmp = buf.get_u8();
8017        __struct.tracking_status =
8018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8019                enum_type: "CameraTrackingStatusFlags",
8020                value: tmp as u32,
8021            })?;
8022        __struct.camera_device_id = buf.get_u8();
8023        Ok(__struct)
8024    }
8025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8026        let mut __tmp = BytesMut::new(bytes);
8027        #[allow(clippy::absurd_extreme_comparisons)]
8028        #[allow(unused_comparisons)]
8029        if __tmp.remaining() < Self::ENCODED_LEN {
8030            panic!(
8031                "buffer is too small (need {} bytes, but got {})",
8032                Self::ENCODED_LEN,
8033                __tmp.remaining(),
8034            )
8035        }
8036        __tmp.put_i32_le(self.lat);
8037        __tmp.put_i32_le(self.lon);
8038        __tmp.put_f32_le(self.alt);
8039        __tmp.put_f32_le(self.h_acc);
8040        __tmp.put_f32_le(self.v_acc);
8041        __tmp.put_f32_le(self.vel_n);
8042        __tmp.put_f32_le(self.vel_e);
8043        __tmp.put_f32_le(self.vel_d);
8044        __tmp.put_f32_le(self.vel_acc);
8045        __tmp.put_f32_le(self.dist);
8046        __tmp.put_f32_le(self.hdg);
8047        __tmp.put_f32_le(self.hdg_acc);
8048        __tmp.put_u8(self.tracking_status as u8);
8049        if matches!(version, MavlinkVersion::V2) {
8050            __tmp.put_u8(self.camera_device_id);
8051            let len = __tmp.len();
8052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8053        } else {
8054            __tmp.len()
8055        }
8056    }
8057}
8058#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8059#[doc = ""]
8060#[doc = "ID: 275"]
8061#[derive(Debug, Clone, PartialEq)]
8062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8064#[cfg_attr(feature = "ts", derive(TS))]
8065#[cfg_attr(feature = "ts", ts(export))]
8066pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8067    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8068    pub point_x: f32,
8069    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8070    pub point_y: f32,
8071    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8072    pub radius: f32,
8073    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8074    pub rec_top_x: f32,
8075    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8076    pub rec_top_y: f32,
8077    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8078    pub rec_bottom_x: f32,
8079    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8080    pub rec_bottom_y: f32,
8081    #[doc = "Current tracking status"]
8082    pub tracking_status: CameraTrackingStatusFlags,
8083    #[doc = "Current tracking mode"]
8084    pub tracking_mode: CameraTrackingMode,
8085    #[doc = "Defines location of target data"]
8086    pub target_data: CameraTrackingTargetData,
8087    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8089    pub camera_device_id: u8,
8090}
8091impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8092    pub const ENCODED_LEN: usize = 32usize;
8093    pub const DEFAULT: Self = Self {
8094        point_x: 0.0_f32,
8095        point_y: 0.0_f32,
8096        radius: 0.0_f32,
8097        rec_top_x: 0.0_f32,
8098        rec_top_y: 0.0_f32,
8099        rec_bottom_x: 0.0_f32,
8100        rec_bottom_y: 0.0_f32,
8101        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8102        tracking_mode: CameraTrackingMode::DEFAULT,
8103        target_data: CameraTrackingTargetData::DEFAULT,
8104        camera_device_id: 0_u8,
8105    };
8106    #[cfg(feature = "arbitrary")]
8107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8108        use arbitrary::{Arbitrary, Unstructured};
8109        let mut buf = [0u8; 1024];
8110        rng.fill_bytes(&mut buf);
8111        let mut unstructured = Unstructured::new(&buf);
8112        Self::arbitrary(&mut unstructured).unwrap_or_default()
8113    }
8114}
8115impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8116    fn default() -> Self {
8117        Self::DEFAULT.clone()
8118    }
8119}
8120impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8121    type Message = MavMessage;
8122    const ID: u32 = 275u32;
8123    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8124    const EXTRA_CRC: u8 = 126u8;
8125    const ENCODED_LEN: usize = 32usize;
8126    fn deser(
8127        _version: MavlinkVersion,
8128        __input: &[u8],
8129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8130        let avail_len = __input.len();
8131        let mut payload_buf = [0; Self::ENCODED_LEN];
8132        let mut buf = if avail_len < Self::ENCODED_LEN {
8133            payload_buf[0..avail_len].copy_from_slice(__input);
8134            Bytes::new(&payload_buf)
8135        } else {
8136            Bytes::new(__input)
8137        };
8138        let mut __struct = Self::default();
8139        __struct.point_x = buf.get_f32_le();
8140        __struct.point_y = buf.get_f32_le();
8141        __struct.radius = buf.get_f32_le();
8142        __struct.rec_top_x = buf.get_f32_le();
8143        __struct.rec_top_y = buf.get_f32_le();
8144        __struct.rec_bottom_x = buf.get_f32_le();
8145        __struct.rec_bottom_y = buf.get_f32_le();
8146        let tmp = buf.get_u8();
8147        __struct.tracking_status =
8148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8149                enum_type: "CameraTrackingStatusFlags",
8150                value: tmp as u32,
8151            })?;
8152        let tmp = buf.get_u8();
8153        __struct.tracking_mode =
8154            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8155                enum_type: "CameraTrackingMode",
8156                value: tmp as u32,
8157            })?;
8158        let tmp = buf.get_u8();
8159        __struct.target_data =
8160            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8161                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8162                    flag_type: "CameraTrackingTargetData",
8163                    value: tmp as u32,
8164                })?;
8165        __struct.camera_device_id = buf.get_u8();
8166        Ok(__struct)
8167    }
8168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8169        let mut __tmp = BytesMut::new(bytes);
8170        #[allow(clippy::absurd_extreme_comparisons)]
8171        #[allow(unused_comparisons)]
8172        if __tmp.remaining() < Self::ENCODED_LEN {
8173            panic!(
8174                "buffer is too small (need {} bytes, but got {})",
8175                Self::ENCODED_LEN,
8176                __tmp.remaining(),
8177            )
8178        }
8179        __tmp.put_f32_le(self.point_x);
8180        __tmp.put_f32_le(self.point_y);
8181        __tmp.put_f32_le(self.radius);
8182        __tmp.put_f32_le(self.rec_top_x);
8183        __tmp.put_f32_le(self.rec_top_y);
8184        __tmp.put_f32_le(self.rec_bottom_x);
8185        __tmp.put_f32_le(self.rec_bottom_y);
8186        __tmp.put_u8(self.tracking_status as u8);
8187        __tmp.put_u8(self.tracking_mode as u8);
8188        __tmp.put_u8(self.target_data.bits());
8189        if matches!(version, MavlinkVersion::V2) {
8190            __tmp.put_u8(self.camera_device_id);
8191            let len = __tmp.len();
8192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8193        } else {
8194            __tmp.len()
8195        }
8196    }
8197}
8198#[doc = "Camera-IMU triggering and synchronisation message."]
8199#[doc = ""]
8200#[doc = "ID: 112"]
8201#[derive(Debug, Clone, PartialEq)]
8202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8204#[cfg_attr(feature = "ts", derive(TS))]
8205#[cfg_attr(feature = "ts", ts(export))]
8206pub struct CAMERA_TRIGGER_DATA {
8207    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8208    pub time_usec: u64,
8209    #[doc = "Image frame sequence"]
8210    pub seq: u32,
8211}
8212impl CAMERA_TRIGGER_DATA {
8213    pub const ENCODED_LEN: usize = 12usize;
8214    pub const DEFAULT: Self = Self {
8215        time_usec: 0_u64,
8216        seq: 0_u32,
8217    };
8218    #[cfg(feature = "arbitrary")]
8219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8220        use arbitrary::{Arbitrary, Unstructured};
8221        let mut buf = [0u8; 1024];
8222        rng.fill_bytes(&mut buf);
8223        let mut unstructured = Unstructured::new(&buf);
8224        Self::arbitrary(&mut unstructured).unwrap_or_default()
8225    }
8226}
8227impl Default for CAMERA_TRIGGER_DATA {
8228    fn default() -> Self {
8229        Self::DEFAULT.clone()
8230    }
8231}
8232impl MessageData for CAMERA_TRIGGER_DATA {
8233    type Message = MavMessage;
8234    const ID: u32 = 112u32;
8235    const NAME: &'static str = "CAMERA_TRIGGER";
8236    const EXTRA_CRC: u8 = 174u8;
8237    const ENCODED_LEN: usize = 12usize;
8238    fn deser(
8239        _version: MavlinkVersion,
8240        __input: &[u8],
8241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8242        let avail_len = __input.len();
8243        let mut payload_buf = [0; Self::ENCODED_LEN];
8244        let mut buf = if avail_len < Self::ENCODED_LEN {
8245            payload_buf[0..avail_len].copy_from_slice(__input);
8246            Bytes::new(&payload_buf)
8247        } else {
8248            Bytes::new(__input)
8249        };
8250        let mut __struct = Self::default();
8251        __struct.time_usec = buf.get_u64_le();
8252        __struct.seq = buf.get_u32_le();
8253        Ok(__struct)
8254    }
8255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8256        let mut __tmp = BytesMut::new(bytes);
8257        #[allow(clippy::absurd_extreme_comparisons)]
8258        #[allow(unused_comparisons)]
8259        if __tmp.remaining() < Self::ENCODED_LEN {
8260            panic!(
8261                "buffer is too small (need {} bytes, but got {})",
8262                Self::ENCODED_LEN,
8263                __tmp.remaining(),
8264            )
8265        }
8266        __tmp.put_u64_le(self.time_usec);
8267        __tmp.put_u32_le(self.seq);
8268        if matches!(version, MavlinkVersion::V2) {
8269            let len = __tmp.len();
8270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8271        } else {
8272            __tmp.len()
8273        }
8274    }
8275}
8276#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8277#[doc = ""]
8278#[doc = "ID: 387"]
8279#[derive(Debug, Clone, PartialEq)]
8280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8282#[cfg_attr(feature = "ts", derive(TS))]
8283#[cfg_attr(feature = "ts", ts(export))]
8284pub struct CANFD_FRAME_DATA {
8285    #[doc = "Frame ID"]
8286    pub id: u32,
8287    #[doc = "System ID."]
8288    pub target_system: u8,
8289    #[doc = "Component ID."]
8290    pub target_component: u8,
8291    #[doc = "bus number"]
8292    pub bus: u8,
8293    #[doc = "Frame length"]
8294    pub len: u8,
8295    #[doc = "Frame data"]
8296    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8297    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8298    pub data: [u8; 64],
8299}
8300impl CANFD_FRAME_DATA {
8301    pub const ENCODED_LEN: usize = 72usize;
8302    pub const DEFAULT: Self = Self {
8303        id: 0_u32,
8304        target_system: 0_u8,
8305        target_component: 0_u8,
8306        bus: 0_u8,
8307        len: 0_u8,
8308        data: [0_u8; 64usize],
8309    };
8310    #[cfg(feature = "arbitrary")]
8311    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8312        use arbitrary::{Arbitrary, Unstructured};
8313        let mut buf = [0u8; 1024];
8314        rng.fill_bytes(&mut buf);
8315        let mut unstructured = Unstructured::new(&buf);
8316        Self::arbitrary(&mut unstructured).unwrap_or_default()
8317    }
8318}
8319impl Default for CANFD_FRAME_DATA {
8320    fn default() -> Self {
8321        Self::DEFAULT.clone()
8322    }
8323}
8324impl MessageData for CANFD_FRAME_DATA {
8325    type Message = MavMessage;
8326    const ID: u32 = 387u32;
8327    const NAME: &'static str = "CANFD_FRAME";
8328    const EXTRA_CRC: u8 = 4u8;
8329    const ENCODED_LEN: usize = 72usize;
8330    fn deser(
8331        _version: MavlinkVersion,
8332        __input: &[u8],
8333    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8334        let avail_len = __input.len();
8335        let mut payload_buf = [0; Self::ENCODED_LEN];
8336        let mut buf = if avail_len < Self::ENCODED_LEN {
8337            payload_buf[0..avail_len].copy_from_slice(__input);
8338            Bytes::new(&payload_buf)
8339        } else {
8340            Bytes::new(__input)
8341        };
8342        let mut __struct = Self::default();
8343        __struct.id = buf.get_u32_le();
8344        __struct.target_system = buf.get_u8();
8345        __struct.target_component = buf.get_u8();
8346        __struct.bus = buf.get_u8();
8347        __struct.len = buf.get_u8();
8348        for v in &mut __struct.data {
8349            let val = buf.get_u8();
8350            *v = val;
8351        }
8352        Ok(__struct)
8353    }
8354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8355        let mut __tmp = BytesMut::new(bytes);
8356        #[allow(clippy::absurd_extreme_comparisons)]
8357        #[allow(unused_comparisons)]
8358        if __tmp.remaining() < Self::ENCODED_LEN {
8359            panic!(
8360                "buffer is too small (need {} bytes, but got {})",
8361                Self::ENCODED_LEN,
8362                __tmp.remaining(),
8363            )
8364        }
8365        __tmp.put_u32_le(self.id);
8366        __tmp.put_u8(self.target_system);
8367        __tmp.put_u8(self.target_component);
8368        __tmp.put_u8(self.bus);
8369        __tmp.put_u8(self.len);
8370        for val in &self.data {
8371            __tmp.put_u8(*val);
8372        }
8373        if matches!(version, MavlinkVersion::V2) {
8374            let len = __tmp.len();
8375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8376        } else {
8377            __tmp.len()
8378        }
8379    }
8380}
8381#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8382#[doc = ""]
8383#[doc = "ID: 388"]
8384#[derive(Debug, Clone, PartialEq)]
8385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8387#[cfg_attr(feature = "ts", derive(TS))]
8388#[cfg_attr(feature = "ts", ts(export))]
8389pub struct CAN_FILTER_MODIFY_DATA {
8390    #[doc = "filter IDs, length num_ids"]
8391    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8392    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8393    pub ids: [u16; 16],
8394    #[doc = "System ID."]
8395    pub target_system: u8,
8396    #[doc = "Component ID."]
8397    pub target_component: u8,
8398    #[doc = "bus number"]
8399    pub bus: u8,
8400    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8401    pub operation: CanFilterOp,
8402    #[doc = "number of IDs in filter list"]
8403    pub num_ids: u8,
8404}
8405impl CAN_FILTER_MODIFY_DATA {
8406    pub const ENCODED_LEN: usize = 37usize;
8407    pub const DEFAULT: Self = Self {
8408        ids: [0_u16; 16usize],
8409        target_system: 0_u8,
8410        target_component: 0_u8,
8411        bus: 0_u8,
8412        operation: CanFilterOp::DEFAULT,
8413        num_ids: 0_u8,
8414    };
8415    #[cfg(feature = "arbitrary")]
8416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8417        use arbitrary::{Arbitrary, Unstructured};
8418        let mut buf = [0u8; 1024];
8419        rng.fill_bytes(&mut buf);
8420        let mut unstructured = Unstructured::new(&buf);
8421        Self::arbitrary(&mut unstructured).unwrap_or_default()
8422    }
8423}
8424impl Default for CAN_FILTER_MODIFY_DATA {
8425    fn default() -> Self {
8426        Self::DEFAULT.clone()
8427    }
8428}
8429impl MessageData for CAN_FILTER_MODIFY_DATA {
8430    type Message = MavMessage;
8431    const ID: u32 = 388u32;
8432    const NAME: &'static str = "CAN_FILTER_MODIFY";
8433    const EXTRA_CRC: u8 = 8u8;
8434    const ENCODED_LEN: usize = 37usize;
8435    fn deser(
8436        _version: MavlinkVersion,
8437        __input: &[u8],
8438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8439        let avail_len = __input.len();
8440        let mut payload_buf = [0; Self::ENCODED_LEN];
8441        let mut buf = if avail_len < Self::ENCODED_LEN {
8442            payload_buf[0..avail_len].copy_from_slice(__input);
8443            Bytes::new(&payload_buf)
8444        } else {
8445            Bytes::new(__input)
8446        };
8447        let mut __struct = Self::default();
8448        for v in &mut __struct.ids {
8449            let val = buf.get_u16_le();
8450            *v = val;
8451        }
8452        __struct.target_system = buf.get_u8();
8453        __struct.target_component = buf.get_u8();
8454        __struct.bus = buf.get_u8();
8455        let tmp = buf.get_u8();
8456        __struct.operation =
8457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8458                enum_type: "CanFilterOp",
8459                value: tmp as u32,
8460            })?;
8461        __struct.num_ids = buf.get_u8();
8462        Ok(__struct)
8463    }
8464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8465        let mut __tmp = BytesMut::new(bytes);
8466        #[allow(clippy::absurd_extreme_comparisons)]
8467        #[allow(unused_comparisons)]
8468        if __tmp.remaining() < Self::ENCODED_LEN {
8469            panic!(
8470                "buffer is too small (need {} bytes, but got {})",
8471                Self::ENCODED_LEN,
8472                __tmp.remaining(),
8473            )
8474        }
8475        for val in &self.ids {
8476            __tmp.put_u16_le(*val);
8477        }
8478        __tmp.put_u8(self.target_system);
8479        __tmp.put_u8(self.target_component);
8480        __tmp.put_u8(self.bus);
8481        __tmp.put_u8(self.operation as u8);
8482        __tmp.put_u8(self.num_ids);
8483        if matches!(version, MavlinkVersion::V2) {
8484            let len = __tmp.len();
8485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8486        } else {
8487            __tmp.len()
8488        }
8489    }
8490}
8491#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8492#[doc = ""]
8493#[doc = "ID: 386"]
8494#[derive(Debug, Clone, PartialEq)]
8495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8497#[cfg_attr(feature = "ts", derive(TS))]
8498#[cfg_attr(feature = "ts", ts(export))]
8499pub struct CAN_FRAME_DATA {
8500    #[doc = "Frame ID"]
8501    pub id: u32,
8502    #[doc = "System ID."]
8503    pub target_system: u8,
8504    #[doc = "Component ID."]
8505    pub target_component: u8,
8506    #[doc = "Bus number"]
8507    pub bus: u8,
8508    #[doc = "Frame length"]
8509    pub len: u8,
8510    #[doc = "Frame data"]
8511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8513    pub data: [u8; 8],
8514}
8515impl CAN_FRAME_DATA {
8516    pub const ENCODED_LEN: usize = 16usize;
8517    pub const DEFAULT: Self = Self {
8518        id: 0_u32,
8519        target_system: 0_u8,
8520        target_component: 0_u8,
8521        bus: 0_u8,
8522        len: 0_u8,
8523        data: [0_u8; 8usize],
8524    };
8525    #[cfg(feature = "arbitrary")]
8526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8527        use arbitrary::{Arbitrary, Unstructured};
8528        let mut buf = [0u8; 1024];
8529        rng.fill_bytes(&mut buf);
8530        let mut unstructured = Unstructured::new(&buf);
8531        Self::arbitrary(&mut unstructured).unwrap_or_default()
8532    }
8533}
8534impl Default for CAN_FRAME_DATA {
8535    fn default() -> Self {
8536        Self::DEFAULT.clone()
8537    }
8538}
8539impl MessageData for CAN_FRAME_DATA {
8540    type Message = MavMessage;
8541    const ID: u32 = 386u32;
8542    const NAME: &'static str = "CAN_FRAME";
8543    const EXTRA_CRC: u8 = 132u8;
8544    const ENCODED_LEN: usize = 16usize;
8545    fn deser(
8546        _version: MavlinkVersion,
8547        __input: &[u8],
8548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8549        let avail_len = __input.len();
8550        let mut payload_buf = [0; Self::ENCODED_LEN];
8551        let mut buf = if avail_len < Self::ENCODED_LEN {
8552            payload_buf[0..avail_len].copy_from_slice(__input);
8553            Bytes::new(&payload_buf)
8554        } else {
8555            Bytes::new(__input)
8556        };
8557        let mut __struct = Self::default();
8558        __struct.id = buf.get_u32_le();
8559        __struct.target_system = buf.get_u8();
8560        __struct.target_component = buf.get_u8();
8561        __struct.bus = buf.get_u8();
8562        __struct.len = buf.get_u8();
8563        for v in &mut __struct.data {
8564            let val = buf.get_u8();
8565            *v = val;
8566        }
8567        Ok(__struct)
8568    }
8569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8570        let mut __tmp = BytesMut::new(bytes);
8571        #[allow(clippy::absurd_extreme_comparisons)]
8572        #[allow(unused_comparisons)]
8573        if __tmp.remaining() < Self::ENCODED_LEN {
8574            panic!(
8575                "buffer is too small (need {} bytes, but got {})",
8576                Self::ENCODED_LEN,
8577                __tmp.remaining(),
8578            )
8579        }
8580        __tmp.put_u32_le(self.id);
8581        __tmp.put_u8(self.target_system);
8582        __tmp.put_u8(self.target_component);
8583        __tmp.put_u8(self.bus);
8584        __tmp.put_u8(self.len);
8585        for val in &self.data {
8586            __tmp.put_u8(*val);
8587        }
8588        if matches!(version, MavlinkVersion::V2) {
8589            let len = __tmp.len();
8590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8591        } else {
8592            __tmp.len()
8593        }
8594    }
8595}
8596#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8597#[doc = ""]
8598#[doc = "ID: 336"]
8599#[derive(Debug, Clone, PartialEq)]
8600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8602#[cfg_attr(feature = "ts", derive(TS))]
8603#[cfg_attr(feature = "ts", ts(export))]
8604pub struct CELLULAR_CONFIG_DATA {
8605    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8606    pub enable_lte: u8,
8607    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8608    pub enable_pin: u8,
8609    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8610    #[cfg_attr(feature = "ts", ts(type = "string"))]
8611    pub pin: CharArray<16>,
8612    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8613    #[cfg_attr(feature = "ts", ts(type = "string"))]
8614    pub new_pin: CharArray<16>,
8615    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8616    #[cfg_attr(feature = "ts", ts(type = "string"))]
8617    pub apn: CharArray<32>,
8618    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8619    #[cfg_attr(feature = "ts", ts(type = "string"))]
8620    pub puk: CharArray<16>,
8621    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8622    pub roaming: u8,
8623    #[doc = "Message acceptance response (sent back to GS)."]
8624    pub response: CellularConfigResponse,
8625}
8626impl CELLULAR_CONFIG_DATA {
8627    pub const ENCODED_LEN: usize = 84usize;
8628    pub const DEFAULT: Self = Self {
8629        enable_lte: 0_u8,
8630        enable_pin: 0_u8,
8631        pin: CharArray::new([0_u8; 16usize]),
8632        new_pin: CharArray::new([0_u8; 16usize]),
8633        apn: CharArray::new([0_u8; 32usize]),
8634        puk: CharArray::new([0_u8; 16usize]),
8635        roaming: 0_u8,
8636        response: CellularConfigResponse::DEFAULT,
8637    };
8638    #[cfg(feature = "arbitrary")]
8639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8640        use arbitrary::{Arbitrary, Unstructured};
8641        let mut buf = [0u8; 1024];
8642        rng.fill_bytes(&mut buf);
8643        let mut unstructured = Unstructured::new(&buf);
8644        Self::arbitrary(&mut unstructured).unwrap_or_default()
8645    }
8646}
8647impl Default for CELLULAR_CONFIG_DATA {
8648    fn default() -> Self {
8649        Self::DEFAULT.clone()
8650    }
8651}
8652impl MessageData for CELLULAR_CONFIG_DATA {
8653    type Message = MavMessage;
8654    const ID: u32 = 336u32;
8655    const NAME: &'static str = "CELLULAR_CONFIG";
8656    const EXTRA_CRC: u8 = 245u8;
8657    const ENCODED_LEN: usize = 84usize;
8658    fn deser(
8659        _version: MavlinkVersion,
8660        __input: &[u8],
8661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8662        let avail_len = __input.len();
8663        let mut payload_buf = [0; Self::ENCODED_LEN];
8664        let mut buf = if avail_len < Self::ENCODED_LEN {
8665            payload_buf[0..avail_len].copy_from_slice(__input);
8666            Bytes::new(&payload_buf)
8667        } else {
8668            Bytes::new(__input)
8669        };
8670        let mut __struct = Self::default();
8671        __struct.enable_lte = buf.get_u8();
8672        __struct.enable_pin = buf.get_u8();
8673        let mut tmp = [0_u8; 16usize];
8674        for v in &mut tmp {
8675            *v = buf.get_u8();
8676        }
8677        __struct.pin = CharArray::new(tmp);
8678        let mut tmp = [0_u8; 16usize];
8679        for v in &mut tmp {
8680            *v = buf.get_u8();
8681        }
8682        __struct.new_pin = CharArray::new(tmp);
8683        let mut tmp = [0_u8; 32usize];
8684        for v in &mut tmp {
8685            *v = buf.get_u8();
8686        }
8687        __struct.apn = CharArray::new(tmp);
8688        let mut tmp = [0_u8; 16usize];
8689        for v in &mut tmp {
8690            *v = buf.get_u8();
8691        }
8692        __struct.puk = CharArray::new(tmp);
8693        __struct.roaming = buf.get_u8();
8694        let tmp = buf.get_u8();
8695        __struct.response =
8696            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8697                enum_type: "CellularConfigResponse",
8698                value: tmp as u32,
8699            })?;
8700        Ok(__struct)
8701    }
8702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8703        let mut __tmp = BytesMut::new(bytes);
8704        #[allow(clippy::absurd_extreme_comparisons)]
8705        #[allow(unused_comparisons)]
8706        if __tmp.remaining() < Self::ENCODED_LEN {
8707            panic!(
8708                "buffer is too small (need {} bytes, but got {})",
8709                Self::ENCODED_LEN,
8710                __tmp.remaining(),
8711            )
8712        }
8713        __tmp.put_u8(self.enable_lte);
8714        __tmp.put_u8(self.enable_pin);
8715        for val in &self.pin {
8716            __tmp.put_u8(*val);
8717        }
8718        for val in &self.new_pin {
8719            __tmp.put_u8(*val);
8720        }
8721        for val in &self.apn {
8722            __tmp.put_u8(*val);
8723        }
8724        for val in &self.puk {
8725            __tmp.put_u8(*val);
8726        }
8727        __tmp.put_u8(self.roaming);
8728        __tmp.put_u8(self.response as u8);
8729        if matches!(version, MavlinkVersion::V2) {
8730            let len = __tmp.len();
8731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8732        } else {
8733            __tmp.len()
8734        }
8735    }
8736}
8737#[doc = "Report current used cellular network status."]
8738#[doc = ""]
8739#[doc = "ID: 334"]
8740#[derive(Debug, Clone, PartialEq)]
8741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8743#[cfg_attr(feature = "ts", derive(TS))]
8744#[cfg_attr(feature = "ts", ts(export))]
8745pub struct CELLULAR_STATUS_DATA {
8746    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8747    pub mcc: u16,
8748    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8749    pub mnc: u16,
8750    #[doc = "Location area code. If unknown, set to 0"]
8751    pub lac: u16,
8752    #[doc = "Cellular modem status"]
8753    pub status: CellularStatusFlag,
8754    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8755    pub failure_reason: CellularNetworkFailedReason,
8756    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8757    pub mavtype: CellularNetworkRadioType,
8758    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8759    pub quality: u8,
8760}
8761impl CELLULAR_STATUS_DATA {
8762    pub const ENCODED_LEN: usize = 10usize;
8763    pub const DEFAULT: Self = Self {
8764        mcc: 0_u16,
8765        mnc: 0_u16,
8766        lac: 0_u16,
8767        status: CellularStatusFlag::DEFAULT,
8768        failure_reason: CellularNetworkFailedReason::DEFAULT,
8769        mavtype: CellularNetworkRadioType::DEFAULT,
8770        quality: 0_u8,
8771    };
8772    #[cfg(feature = "arbitrary")]
8773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8774        use arbitrary::{Arbitrary, Unstructured};
8775        let mut buf = [0u8; 1024];
8776        rng.fill_bytes(&mut buf);
8777        let mut unstructured = Unstructured::new(&buf);
8778        Self::arbitrary(&mut unstructured).unwrap_or_default()
8779    }
8780}
8781impl Default for CELLULAR_STATUS_DATA {
8782    fn default() -> Self {
8783        Self::DEFAULT.clone()
8784    }
8785}
8786impl MessageData for CELLULAR_STATUS_DATA {
8787    type Message = MavMessage;
8788    const ID: u32 = 334u32;
8789    const NAME: &'static str = "CELLULAR_STATUS";
8790    const EXTRA_CRC: u8 = 72u8;
8791    const ENCODED_LEN: usize = 10usize;
8792    fn deser(
8793        _version: MavlinkVersion,
8794        __input: &[u8],
8795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8796        let avail_len = __input.len();
8797        let mut payload_buf = [0; Self::ENCODED_LEN];
8798        let mut buf = if avail_len < Self::ENCODED_LEN {
8799            payload_buf[0..avail_len].copy_from_slice(__input);
8800            Bytes::new(&payload_buf)
8801        } else {
8802            Bytes::new(__input)
8803        };
8804        let mut __struct = Self::default();
8805        __struct.mcc = buf.get_u16_le();
8806        __struct.mnc = buf.get_u16_le();
8807        __struct.lac = buf.get_u16_le();
8808        let tmp = buf.get_u8();
8809        __struct.status =
8810            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8811                enum_type: "CellularStatusFlag",
8812                value: tmp as u32,
8813            })?;
8814        let tmp = buf.get_u8();
8815        __struct.failure_reason =
8816            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8817                enum_type: "CellularNetworkFailedReason",
8818                value: tmp as u32,
8819            })?;
8820        let tmp = buf.get_u8();
8821        __struct.mavtype =
8822            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8823                enum_type: "CellularNetworkRadioType",
8824                value: tmp as u32,
8825            })?;
8826        __struct.quality = buf.get_u8();
8827        Ok(__struct)
8828    }
8829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8830        let mut __tmp = BytesMut::new(bytes);
8831        #[allow(clippy::absurd_extreme_comparisons)]
8832        #[allow(unused_comparisons)]
8833        if __tmp.remaining() < Self::ENCODED_LEN {
8834            panic!(
8835                "buffer is too small (need {} bytes, but got {})",
8836                Self::ENCODED_LEN,
8837                __tmp.remaining(),
8838            )
8839        }
8840        __tmp.put_u16_le(self.mcc);
8841        __tmp.put_u16_le(self.mnc);
8842        __tmp.put_u16_le(self.lac);
8843        __tmp.put_u8(self.status as u8);
8844        __tmp.put_u8(self.failure_reason as u8);
8845        __tmp.put_u8(self.mavtype as u8);
8846        __tmp.put_u8(self.quality);
8847        if matches!(version, MavlinkVersion::V2) {
8848            let len = __tmp.len();
8849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8850        } else {
8851            __tmp.len()
8852        }
8853    }
8854}
8855#[doc = "Request to control this MAV."]
8856#[doc = ""]
8857#[doc = "ID: 5"]
8858#[derive(Debug, Clone, PartialEq)]
8859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8861#[cfg_attr(feature = "ts", derive(TS))]
8862#[cfg_attr(feature = "ts", ts(export))]
8863pub struct CHANGE_OPERATOR_CONTROL_DATA {
8864    #[doc = "System the GCS requests control for"]
8865    pub target_system: u8,
8866    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8867    pub control_request: u8,
8868    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8869    pub version: u8,
8870    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8871    #[cfg_attr(feature = "ts", ts(type = "string"))]
8872    pub passkey: CharArray<25>,
8873}
8874impl CHANGE_OPERATOR_CONTROL_DATA {
8875    pub const ENCODED_LEN: usize = 28usize;
8876    pub const DEFAULT: Self = Self {
8877        target_system: 0_u8,
8878        control_request: 0_u8,
8879        version: 0_u8,
8880        passkey: CharArray::new([0_u8; 25usize]),
8881    };
8882    #[cfg(feature = "arbitrary")]
8883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8884        use arbitrary::{Arbitrary, Unstructured};
8885        let mut buf = [0u8; 1024];
8886        rng.fill_bytes(&mut buf);
8887        let mut unstructured = Unstructured::new(&buf);
8888        Self::arbitrary(&mut unstructured).unwrap_or_default()
8889    }
8890}
8891impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8892    fn default() -> Self {
8893        Self::DEFAULT.clone()
8894    }
8895}
8896impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8897    type Message = MavMessage;
8898    const ID: u32 = 5u32;
8899    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8900    const EXTRA_CRC: u8 = 217u8;
8901    const ENCODED_LEN: usize = 28usize;
8902    fn deser(
8903        _version: MavlinkVersion,
8904        __input: &[u8],
8905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8906        let avail_len = __input.len();
8907        let mut payload_buf = [0; Self::ENCODED_LEN];
8908        let mut buf = if avail_len < Self::ENCODED_LEN {
8909            payload_buf[0..avail_len].copy_from_slice(__input);
8910            Bytes::new(&payload_buf)
8911        } else {
8912            Bytes::new(__input)
8913        };
8914        let mut __struct = Self::default();
8915        __struct.target_system = buf.get_u8();
8916        __struct.control_request = buf.get_u8();
8917        __struct.version = buf.get_u8();
8918        let mut tmp = [0_u8; 25usize];
8919        for v in &mut tmp {
8920            *v = buf.get_u8();
8921        }
8922        __struct.passkey = CharArray::new(tmp);
8923        Ok(__struct)
8924    }
8925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8926        let mut __tmp = BytesMut::new(bytes);
8927        #[allow(clippy::absurd_extreme_comparisons)]
8928        #[allow(unused_comparisons)]
8929        if __tmp.remaining() < Self::ENCODED_LEN {
8930            panic!(
8931                "buffer is too small (need {} bytes, but got {})",
8932                Self::ENCODED_LEN,
8933                __tmp.remaining(),
8934            )
8935        }
8936        __tmp.put_u8(self.target_system);
8937        __tmp.put_u8(self.control_request);
8938        __tmp.put_u8(self.version);
8939        for val in &self.passkey {
8940            __tmp.put_u8(*val);
8941        }
8942        if matches!(version, MavlinkVersion::V2) {
8943            let len = __tmp.len();
8944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8945        } else {
8946            __tmp.len()
8947        }
8948    }
8949}
8950#[doc = "Accept / deny control of this MAV."]
8951#[doc = ""]
8952#[doc = "ID: 6"]
8953#[derive(Debug, Clone, PartialEq)]
8954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8956#[cfg_attr(feature = "ts", derive(TS))]
8957#[cfg_attr(feature = "ts", ts(export))]
8958pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8959    #[doc = "ID of the GCS this message"]
8960    pub gcs_system_id: u8,
8961    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8962    pub control_request: u8,
8963    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8964    pub ack: u8,
8965}
8966impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8967    pub const ENCODED_LEN: usize = 3usize;
8968    pub const DEFAULT: Self = Self {
8969        gcs_system_id: 0_u8,
8970        control_request: 0_u8,
8971        ack: 0_u8,
8972    };
8973    #[cfg(feature = "arbitrary")]
8974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8975        use arbitrary::{Arbitrary, Unstructured};
8976        let mut buf = [0u8; 1024];
8977        rng.fill_bytes(&mut buf);
8978        let mut unstructured = Unstructured::new(&buf);
8979        Self::arbitrary(&mut unstructured).unwrap_or_default()
8980    }
8981}
8982impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8983    fn default() -> Self {
8984        Self::DEFAULT.clone()
8985    }
8986}
8987impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8988    type Message = MavMessage;
8989    const ID: u32 = 6u32;
8990    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8991    const EXTRA_CRC: u8 = 104u8;
8992    const ENCODED_LEN: usize = 3usize;
8993    fn deser(
8994        _version: MavlinkVersion,
8995        __input: &[u8],
8996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8997        let avail_len = __input.len();
8998        let mut payload_buf = [0; Self::ENCODED_LEN];
8999        let mut buf = if avail_len < Self::ENCODED_LEN {
9000            payload_buf[0..avail_len].copy_from_slice(__input);
9001            Bytes::new(&payload_buf)
9002        } else {
9003            Bytes::new(__input)
9004        };
9005        let mut __struct = Self::default();
9006        __struct.gcs_system_id = buf.get_u8();
9007        __struct.control_request = buf.get_u8();
9008        __struct.ack = buf.get_u8();
9009        Ok(__struct)
9010    }
9011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9012        let mut __tmp = BytesMut::new(bytes);
9013        #[allow(clippy::absurd_extreme_comparisons)]
9014        #[allow(unused_comparisons)]
9015        if __tmp.remaining() < Self::ENCODED_LEN {
9016            panic!(
9017                "buffer is too small (need {} bytes, but got {})",
9018                Self::ENCODED_LEN,
9019                __tmp.remaining(),
9020            )
9021        }
9022        __tmp.put_u8(self.gcs_system_id);
9023        __tmp.put_u8(self.control_request);
9024        __tmp.put_u8(self.ack);
9025        if matches!(version, MavlinkVersion::V2) {
9026            let len = __tmp.len();
9027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9028        } else {
9029            __tmp.len()
9030        }
9031    }
9032}
9033#[doc = "Information about a potential collision."]
9034#[doc = ""]
9035#[doc = "ID: 247"]
9036#[derive(Debug, Clone, PartialEq)]
9037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9039#[cfg_attr(feature = "ts", derive(TS))]
9040#[cfg_attr(feature = "ts", ts(export))]
9041pub struct COLLISION_DATA {
9042    #[doc = "Unique identifier, domain based on src field"]
9043    pub id: u32,
9044    #[doc = "Estimated time until collision occurs"]
9045    pub time_to_minimum_delta: f32,
9046    #[doc = "Closest vertical distance between vehicle and object"]
9047    pub altitude_minimum_delta: f32,
9048    #[doc = "Closest horizontal distance between vehicle and object"]
9049    pub horizontal_minimum_delta: f32,
9050    #[doc = "Collision data source"]
9051    pub src: MavCollisionSrc,
9052    #[doc = "Action that is being taken to avoid this collision"]
9053    pub action: MavCollisionAction,
9054    #[doc = "How concerned the aircraft is about this collision"]
9055    pub threat_level: MavCollisionThreatLevel,
9056}
9057impl COLLISION_DATA {
9058    pub const ENCODED_LEN: usize = 19usize;
9059    pub const DEFAULT: Self = Self {
9060        id: 0_u32,
9061        time_to_minimum_delta: 0.0_f32,
9062        altitude_minimum_delta: 0.0_f32,
9063        horizontal_minimum_delta: 0.0_f32,
9064        src: MavCollisionSrc::DEFAULT,
9065        action: MavCollisionAction::DEFAULT,
9066        threat_level: MavCollisionThreatLevel::DEFAULT,
9067    };
9068    #[cfg(feature = "arbitrary")]
9069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9070        use arbitrary::{Arbitrary, Unstructured};
9071        let mut buf = [0u8; 1024];
9072        rng.fill_bytes(&mut buf);
9073        let mut unstructured = Unstructured::new(&buf);
9074        Self::arbitrary(&mut unstructured).unwrap_or_default()
9075    }
9076}
9077impl Default for COLLISION_DATA {
9078    fn default() -> Self {
9079        Self::DEFAULT.clone()
9080    }
9081}
9082impl MessageData for COLLISION_DATA {
9083    type Message = MavMessage;
9084    const ID: u32 = 247u32;
9085    const NAME: &'static str = "COLLISION";
9086    const EXTRA_CRC: u8 = 81u8;
9087    const ENCODED_LEN: usize = 19usize;
9088    fn deser(
9089        _version: MavlinkVersion,
9090        __input: &[u8],
9091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9092        let avail_len = __input.len();
9093        let mut payload_buf = [0; Self::ENCODED_LEN];
9094        let mut buf = if avail_len < Self::ENCODED_LEN {
9095            payload_buf[0..avail_len].copy_from_slice(__input);
9096            Bytes::new(&payload_buf)
9097        } else {
9098            Bytes::new(__input)
9099        };
9100        let mut __struct = Self::default();
9101        __struct.id = buf.get_u32_le();
9102        __struct.time_to_minimum_delta = buf.get_f32_le();
9103        __struct.altitude_minimum_delta = buf.get_f32_le();
9104        __struct.horizontal_minimum_delta = buf.get_f32_le();
9105        let tmp = buf.get_u8();
9106        __struct.src =
9107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9108                enum_type: "MavCollisionSrc",
9109                value: tmp as u32,
9110            })?;
9111        let tmp = buf.get_u8();
9112        __struct.action =
9113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9114                enum_type: "MavCollisionAction",
9115                value: tmp as u32,
9116            })?;
9117        let tmp = buf.get_u8();
9118        __struct.threat_level =
9119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9120                enum_type: "MavCollisionThreatLevel",
9121                value: tmp as u32,
9122            })?;
9123        Ok(__struct)
9124    }
9125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9126        let mut __tmp = BytesMut::new(bytes);
9127        #[allow(clippy::absurd_extreme_comparisons)]
9128        #[allow(unused_comparisons)]
9129        if __tmp.remaining() < Self::ENCODED_LEN {
9130            panic!(
9131                "buffer is too small (need {} bytes, but got {})",
9132                Self::ENCODED_LEN,
9133                __tmp.remaining(),
9134            )
9135        }
9136        __tmp.put_u32_le(self.id);
9137        __tmp.put_f32_le(self.time_to_minimum_delta);
9138        __tmp.put_f32_le(self.altitude_minimum_delta);
9139        __tmp.put_f32_le(self.horizontal_minimum_delta);
9140        __tmp.put_u8(self.src as u8);
9141        __tmp.put_u8(self.action as u8);
9142        __tmp.put_u8(self.threat_level as u8);
9143        if matches!(version, MavlinkVersion::V2) {
9144            let len = __tmp.len();
9145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9146        } else {
9147            __tmp.len()
9148        }
9149    }
9150}
9151#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9152#[doc = ""]
9153#[doc = "ID: 77"]
9154#[derive(Debug, Clone, PartialEq)]
9155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9157#[cfg_attr(feature = "ts", derive(TS))]
9158#[cfg_attr(feature = "ts", ts(export))]
9159pub struct COMMAND_ACK_DATA {
9160    #[doc = "Command ID (of acknowledged command)."]
9161    pub command: MavCmd,
9162    #[doc = "Result of command."]
9163    pub result: MavResult,
9164    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9166    pub progress: u8,
9167    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9169    pub result_param2: i32,
9170    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9172    pub target_system: u8,
9173    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9175    pub target_component: u8,
9176}
9177impl COMMAND_ACK_DATA {
9178    pub const ENCODED_LEN: usize = 10usize;
9179    pub const DEFAULT: Self = Self {
9180        command: MavCmd::DEFAULT,
9181        result: MavResult::DEFAULT,
9182        progress: 0_u8,
9183        result_param2: 0_i32,
9184        target_system: 0_u8,
9185        target_component: 0_u8,
9186    };
9187    #[cfg(feature = "arbitrary")]
9188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9189        use arbitrary::{Arbitrary, Unstructured};
9190        let mut buf = [0u8; 1024];
9191        rng.fill_bytes(&mut buf);
9192        let mut unstructured = Unstructured::new(&buf);
9193        Self::arbitrary(&mut unstructured).unwrap_or_default()
9194    }
9195}
9196impl Default for COMMAND_ACK_DATA {
9197    fn default() -> Self {
9198        Self::DEFAULT.clone()
9199    }
9200}
9201impl MessageData for COMMAND_ACK_DATA {
9202    type Message = MavMessage;
9203    const ID: u32 = 77u32;
9204    const NAME: &'static str = "COMMAND_ACK";
9205    const EXTRA_CRC: u8 = 143u8;
9206    const ENCODED_LEN: usize = 10usize;
9207    fn deser(
9208        _version: MavlinkVersion,
9209        __input: &[u8],
9210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9211        let avail_len = __input.len();
9212        let mut payload_buf = [0; Self::ENCODED_LEN];
9213        let mut buf = if avail_len < Self::ENCODED_LEN {
9214            payload_buf[0..avail_len].copy_from_slice(__input);
9215            Bytes::new(&payload_buf)
9216        } else {
9217            Bytes::new(__input)
9218        };
9219        let mut __struct = Self::default();
9220        let tmp = buf.get_u16_le();
9221        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9222            ::mavlink_core::error::ParserError::InvalidEnum {
9223                enum_type: "MavCmd",
9224                value: tmp as u32,
9225            },
9226        )?;
9227        let tmp = buf.get_u8();
9228        __struct.result =
9229            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9230                enum_type: "MavResult",
9231                value: tmp as u32,
9232            })?;
9233        __struct.progress = buf.get_u8();
9234        __struct.result_param2 = buf.get_i32_le();
9235        __struct.target_system = buf.get_u8();
9236        __struct.target_component = buf.get_u8();
9237        Ok(__struct)
9238    }
9239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9240        let mut __tmp = BytesMut::new(bytes);
9241        #[allow(clippy::absurd_extreme_comparisons)]
9242        #[allow(unused_comparisons)]
9243        if __tmp.remaining() < Self::ENCODED_LEN {
9244            panic!(
9245                "buffer is too small (need {} bytes, but got {})",
9246                Self::ENCODED_LEN,
9247                __tmp.remaining(),
9248            )
9249        }
9250        __tmp.put_u16_le(self.command as u16);
9251        __tmp.put_u8(self.result as u8);
9252        if matches!(version, MavlinkVersion::V2) {
9253            __tmp.put_u8(self.progress);
9254            __tmp.put_i32_le(self.result_param2);
9255            __tmp.put_u8(self.target_system);
9256            __tmp.put_u8(self.target_component);
9257            let len = __tmp.len();
9258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9259        } else {
9260            __tmp.len()
9261        }
9262    }
9263}
9264#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9265#[doc = ""]
9266#[doc = "ID: 80"]
9267#[derive(Debug, Clone, PartialEq)]
9268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9270#[cfg_attr(feature = "ts", derive(TS))]
9271#[cfg_attr(feature = "ts", ts(export))]
9272pub struct COMMAND_CANCEL_DATA {
9273    #[doc = "Command ID (of command to cancel)."]
9274    pub command: MavCmd,
9275    #[doc = "System executing long running command. Should not be broadcast (0)."]
9276    pub target_system: u8,
9277    #[doc = "Component executing long running command."]
9278    pub target_component: u8,
9279}
9280impl COMMAND_CANCEL_DATA {
9281    pub const ENCODED_LEN: usize = 4usize;
9282    pub const DEFAULT: Self = Self {
9283        command: MavCmd::DEFAULT,
9284        target_system: 0_u8,
9285        target_component: 0_u8,
9286    };
9287    #[cfg(feature = "arbitrary")]
9288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9289        use arbitrary::{Arbitrary, Unstructured};
9290        let mut buf = [0u8; 1024];
9291        rng.fill_bytes(&mut buf);
9292        let mut unstructured = Unstructured::new(&buf);
9293        Self::arbitrary(&mut unstructured).unwrap_or_default()
9294    }
9295}
9296impl Default for COMMAND_CANCEL_DATA {
9297    fn default() -> Self {
9298        Self::DEFAULT.clone()
9299    }
9300}
9301impl MessageData for COMMAND_CANCEL_DATA {
9302    type Message = MavMessage;
9303    const ID: u32 = 80u32;
9304    const NAME: &'static str = "COMMAND_CANCEL";
9305    const EXTRA_CRC: u8 = 14u8;
9306    const ENCODED_LEN: usize = 4usize;
9307    fn deser(
9308        _version: MavlinkVersion,
9309        __input: &[u8],
9310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9311        let avail_len = __input.len();
9312        let mut payload_buf = [0; Self::ENCODED_LEN];
9313        let mut buf = if avail_len < Self::ENCODED_LEN {
9314            payload_buf[0..avail_len].copy_from_slice(__input);
9315            Bytes::new(&payload_buf)
9316        } else {
9317            Bytes::new(__input)
9318        };
9319        let mut __struct = Self::default();
9320        let tmp = buf.get_u16_le();
9321        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9322            ::mavlink_core::error::ParserError::InvalidEnum {
9323                enum_type: "MavCmd",
9324                value: tmp as u32,
9325            },
9326        )?;
9327        __struct.target_system = buf.get_u8();
9328        __struct.target_component = buf.get_u8();
9329        Ok(__struct)
9330    }
9331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9332        let mut __tmp = BytesMut::new(bytes);
9333        #[allow(clippy::absurd_extreme_comparisons)]
9334        #[allow(unused_comparisons)]
9335        if __tmp.remaining() < Self::ENCODED_LEN {
9336            panic!(
9337                "buffer is too small (need {} bytes, but got {})",
9338                Self::ENCODED_LEN,
9339                __tmp.remaining(),
9340            )
9341        }
9342        __tmp.put_u16_le(self.command as u16);
9343        __tmp.put_u8(self.target_system);
9344        __tmp.put_u8(self.target_component);
9345        if matches!(version, MavlinkVersion::V2) {
9346            let len = __tmp.len();
9347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9348        } else {
9349            __tmp.len()
9350        }
9351    }
9352}
9353#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9354#[doc = ""]
9355#[doc = "ID: 75"]
9356#[derive(Debug, Clone, PartialEq)]
9357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9359#[cfg_attr(feature = "ts", derive(TS))]
9360#[cfg_attr(feature = "ts", ts(export))]
9361pub struct COMMAND_INT_DATA {
9362    #[doc = "PARAM1, see MAV_CMD enum"]
9363    pub param1: f32,
9364    #[doc = "PARAM2, see MAV_CMD enum"]
9365    pub param2: f32,
9366    #[doc = "PARAM3, see MAV_CMD enum"]
9367    pub param3: f32,
9368    #[doc = "PARAM4, see MAV_CMD enum"]
9369    pub param4: f32,
9370    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9371    pub x: i32,
9372    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9373    pub y: i32,
9374    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9375    pub z: f32,
9376    #[doc = "The scheduled action for the mission item."]
9377    pub command: MavCmd,
9378    #[doc = "System ID"]
9379    pub target_system: u8,
9380    #[doc = "Component ID"]
9381    pub target_component: u8,
9382    #[doc = "The coordinate system of the COMMAND."]
9383    pub frame: MavFrame,
9384    #[doc = "Not used."]
9385    pub current: u8,
9386    #[doc = "Not used (set 0)."]
9387    pub autocontinue: u8,
9388}
9389impl COMMAND_INT_DATA {
9390    pub const ENCODED_LEN: usize = 35usize;
9391    pub const DEFAULT: Self = Self {
9392        param1: 0.0_f32,
9393        param2: 0.0_f32,
9394        param3: 0.0_f32,
9395        param4: 0.0_f32,
9396        x: 0_i32,
9397        y: 0_i32,
9398        z: 0.0_f32,
9399        command: MavCmd::DEFAULT,
9400        target_system: 0_u8,
9401        target_component: 0_u8,
9402        frame: MavFrame::DEFAULT,
9403        current: 0_u8,
9404        autocontinue: 0_u8,
9405    };
9406    #[cfg(feature = "arbitrary")]
9407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9408        use arbitrary::{Arbitrary, Unstructured};
9409        let mut buf = [0u8; 1024];
9410        rng.fill_bytes(&mut buf);
9411        let mut unstructured = Unstructured::new(&buf);
9412        Self::arbitrary(&mut unstructured).unwrap_or_default()
9413    }
9414}
9415impl Default for COMMAND_INT_DATA {
9416    fn default() -> Self {
9417        Self::DEFAULT.clone()
9418    }
9419}
9420impl MessageData for COMMAND_INT_DATA {
9421    type Message = MavMessage;
9422    const ID: u32 = 75u32;
9423    const NAME: &'static str = "COMMAND_INT";
9424    const EXTRA_CRC: u8 = 158u8;
9425    const ENCODED_LEN: usize = 35usize;
9426    fn deser(
9427        _version: MavlinkVersion,
9428        __input: &[u8],
9429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9430        let avail_len = __input.len();
9431        let mut payload_buf = [0; Self::ENCODED_LEN];
9432        let mut buf = if avail_len < Self::ENCODED_LEN {
9433            payload_buf[0..avail_len].copy_from_slice(__input);
9434            Bytes::new(&payload_buf)
9435        } else {
9436            Bytes::new(__input)
9437        };
9438        let mut __struct = Self::default();
9439        __struct.param1 = buf.get_f32_le();
9440        __struct.param2 = buf.get_f32_le();
9441        __struct.param3 = buf.get_f32_le();
9442        __struct.param4 = buf.get_f32_le();
9443        __struct.x = buf.get_i32_le();
9444        __struct.y = buf.get_i32_le();
9445        __struct.z = buf.get_f32_le();
9446        let tmp = buf.get_u16_le();
9447        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9448            ::mavlink_core::error::ParserError::InvalidEnum {
9449                enum_type: "MavCmd",
9450                value: tmp as u32,
9451            },
9452        )?;
9453        __struct.target_system = buf.get_u8();
9454        __struct.target_component = buf.get_u8();
9455        let tmp = buf.get_u8();
9456        __struct.frame =
9457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9458                enum_type: "MavFrame",
9459                value: tmp as u32,
9460            })?;
9461        __struct.current = buf.get_u8();
9462        __struct.autocontinue = buf.get_u8();
9463        Ok(__struct)
9464    }
9465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9466        let mut __tmp = BytesMut::new(bytes);
9467        #[allow(clippy::absurd_extreme_comparisons)]
9468        #[allow(unused_comparisons)]
9469        if __tmp.remaining() < Self::ENCODED_LEN {
9470            panic!(
9471                "buffer is too small (need {} bytes, but got {})",
9472                Self::ENCODED_LEN,
9473                __tmp.remaining(),
9474            )
9475        }
9476        __tmp.put_f32_le(self.param1);
9477        __tmp.put_f32_le(self.param2);
9478        __tmp.put_f32_le(self.param3);
9479        __tmp.put_f32_le(self.param4);
9480        __tmp.put_i32_le(self.x);
9481        __tmp.put_i32_le(self.y);
9482        __tmp.put_f32_le(self.z);
9483        __tmp.put_u16_le(self.command as u16);
9484        __tmp.put_u8(self.target_system);
9485        __tmp.put_u8(self.target_component);
9486        __tmp.put_u8(self.frame as u8);
9487        __tmp.put_u8(self.current);
9488        __tmp.put_u8(self.autocontinue);
9489        if matches!(version, MavlinkVersion::V2) {
9490            let len = __tmp.len();
9491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9492        } else {
9493            __tmp.len()
9494        }
9495    }
9496}
9497#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9498#[doc = ""]
9499#[doc = "ID: 76"]
9500#[derive(Debug, Clone, PartialEq)]
9501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9503#[cfg_attr(feature = "ts", derive(TS))]
9504#[cfg_attr(feature = "ts", ts(export))]
9505pub struct COMMAND_LONG_DATA {
9506    #[doc = "Parameter 1 (for the specific command)."]
9507    pub param1: f32,
9508    #[doc = "Parameter 2 (for the specific command)."]
9509    pub param2: f32,
9510    #[doc = "Parameter 3 (for the specific command)."]
9511    pub param3: f32,
9512    #[doc = "Parameter 4 (for the specific command)."]
9513    pub param4: f32,
9514    #[doc = "Parameter 5 (for the specific command)."]
9515    pub param5: f32,
9516    #[doc = "Parameter 6 (for the specific command)."]
9517    pub param6: f32,
9518    #[doc = "Parameter 7 (for the specific command)."]
9519    pub param7: f32,
9520    #[doc = "Command ID (of command to send)."]
9521    pub command: MavCmd,
9522    #[doc = "System which should execute the command"]
9523    pub target_system: u8,
9524    #[doc = "Component which should execute the command, 0 for all components"]
9525    pub target_component: u8,
9526    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9527    pub confirmation: u8,
9528}
9529impl COMMAND_LONG_DATA {
9530    pub const ENCODED_LEN: usize = 33usize;
9531    pub const DEFAULT: Self = Self {
9532        param1: 0.0_f32,
9533        param2: 0.0_f32,
9534        param3: 0.0_f32,
9535        param4: 0.0_f32,
9536        param5: 0.0_f32,
9537        param6: 0.0_f32,
9538        param7: 0.0_f32,
9539        command: MavCmd::DEFAULT,
9540        target_system: 0_u8,
9541        target_component: 0_u8,
9542        confirmation: 0_u8,
9543    };
9544    #[cfg(feature = "arbitrary")]
9545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9546        use arbitrary::{Arbitrary, Unstructured};
9547        let mut buf = [0u8; 1024];
9548        rng.fill_bytes(&mut buf);
9549        let mut unstructured = Unstructured::new(&buf);
9550        Self::arbitrary(&mut unstructured).unwrap_or_default()
9551    }
9552}
9553impl Default for COMMAND_LONG_DATA {
9554    fn default() -> Self {
9555        Self::DEFAULT.clone()
9556    }
9557}
9558impl MessageData for COMMAND_LONG_DATA {
9559    type Message = MavMessage;
9560    const ID: u32 = 76u32;
9561    const NAME: &'static str = "COMMAND_LONG";
9562    const EXTRA_CRC: u8 = 152u8;
9563    const ENCODED_LEN: usize = 33usize;
9564    fn deser(
9565        _version: MavlinkVersion,
9566        __input: &[u8],
9567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9568        let avail_len = __input.len();
9569        let mut payload_buf = [0; Self::ENCODED_LEN];
9570        let mut buf = if avail_len < Self::ENCODED_LEN {
9571            payload_buf[0..avail_len].copy_from_slice(__input);
9572            Bytes::new(&payload_buf)
9573        } else {
9574            Bytes::new(__input)
9575        };
9576        let mut __struct = Self::default();
9577        __struct.param1 = buf.get_f32_le();
9578        __struct.param2 = buf.get_f32_le();
9579        __struct.param3 = buf.get_f32_le();
9580        __struct.param4 = buf.get_f32_le();
9581        __struct.param5 = buf.get_f32_le();
9582        __struct.param6 = buf.get_f32_le();
9583        __struct.param7 = buf.get_f32_le();
9584        let tmp = buf.get_u16_le();
9585        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9586            ::mavlink_core::error::ParserError::InvalidEnum {
9587                enum_type: "MavCmd",
9588                value: tmp as u32,
9589            },
9590        )?;
9591        __struct.target_system = buf.get_u8();
9592        __struct.target_component = buf.get_u8();
9593        __struct.confirmation = buf.get_u8();
9594        Ok(__struct)
9595    }
9596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9597        let mut __tmp = BytesMut::new(bytes);
9598        #[allow(clippy::absurd_extreme_comparisons)]
9599        #[allow(unused_comparisons)]
9600        if __tmp.remaining() < Self::ENCODED_LEN {
9601            panic!(
9602                "buffer is too small (need {} bytes, but got {})",
9603                Self::ENCODED_LEN,
9604                __tmp.remaining(),
9605            )
9606        }
9607        __tmp.put_f32_le(self.param1);
9608        __tmp.put_f32_le(self.param2);
9609        __tmp.put_f32_le(self.param3);
9610        __tmp.put_f32_le(self.param4);
9611        __tmp.put_f32_le(self.param5);
9612        __tmp.put_f32_le(self.param6);
9613        __tmp.put_f32_le(self.param7);
9614        __tmp.put_u16_le(self.command as u16);
9615        __tmp.put_u8(self.target_system);
9616        __tmp.put_u8(self.target_component);
9617        __tmp.put_u8(self.confirmation);
9618        if matches!(version, MavlinkVersion::V2) {
9619            let len = __tmp.len();
9620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9621        } else {
9622            __tmp.len()
9623        }
9624    }
9625}
9626#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9627#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9628#[doc = ""]
9629#[doc = "ID: 395"]
9630#[derive(Debug, Clone, PartialEq)]
9631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9633#[cfg_attr(feature = "ts", derive(TS))]
9634#[cfg_attr(feature = "ts", ts(export))]
9635pub struct COMPONENT_INFORMATION_DATA {
9636    #[doc = "Timestamp (time since system boot)."]
9637    pub time_boot_ms: u32,
9638    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9639    pub general_metadata_file_crc: u32,
9640    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9641    pub peripherals_metadata_file_crc: u32,
9642    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9643    #[cfg_attr(feature = "ts", ts(type = "string"))]
9644    pub general_metadata_uri: CharArray<100>,
9645    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9646    #[cfg_attr(feature = "ts", ts(type = "string"))]
9647    pub peripherals_metadata_uri: CharArray<100>,
9648}
9649impl COMPONENT_INFORMATION_DATA {
9650    pub const ENCODED_LEN: usize = 212usize;
9651    pub const DEFAULT: Self = Self {
9652        time_boot_ms: 0_u32,
9653        general_metadata_file_crc: 0_u32,
9654        peripherals_metadata_file_crc: 0_u32,
9655        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9656        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9657    };
9658    #[cfg(feature = "arbitrary")]
9659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9660        use arbitrary::{Arbitrary, Unstructured};
9661        let mut buf = [0u8; 1024];
9662        rng.fill_bytes(&mut buf);
9663        let mut unstructured = Unstructured::new(&buf);
9664        Self::arbitrary(&mut unstructured).unwrap_or_default()
9665    }
9666}
9667impl Default for COMPONENT_INFORMATION_DATA {
9668    fn default() -> Self {
9669        Self::DEFAULT.clone()
9670    }
9671}
9672impl MessageData for COMPONENT_INFORMATION_DATA {
9673    type Message = MavMessage;
9674    const ID: u32 = 395u32;
9675    const NAME: &'static str = "COMPONENT_INFORMATION";
9676    const EXTRA_CRC: u8 = 0u8;
9677    const ENCODED_LEN: usize = 212usize;
9678    fn deser(
9679        _version: MavlinkVersion,
9680        __input: &[u8],
9681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9682        let avail_len = __input.len();
9683        let mut payload_buf = [0; Self::ENCODED_LEN];
9684        let mut buf = if avail_len < Self::ENCODED_LEN {
9685            payload_buf[0..avail_len].copy_from_slice(__input);
9686            Bytes::new(&payload_buf)
9687        } else {
9688            Bytes::new(__input)
9689        };
9690        let mut __struct = Self::default();
9691        __struct.time_boot_ms = buf.get_u32_le();
9692        __struct.general_metadata_file_crc = buf.get_u32_le();
9693        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9694        let mut tmp = [0_u8; 100usize];
9695        for v in &mut tmp {
9696            *v = buf.get_u8();
9697        }
9698        __struct.general_metadata_uri = CharArray::new(tmp);
9699        let mut tmp = [0_u8; 100usize];
9700        for v in &mut tmp {
9701            *v = buf.get_u8();
9702        }
9703        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9704        Ok(__struct)
9705    }
9706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9707        let mut __tmp = BytesMut::new(bytes);
9708        #[allow(clippy::absurd_extreme_comparisons)]
9709        #[allow(unused_comparisons)]
9710        if __tmp.remaining() < Self::ENCODED_LEN {
9711            panic!(
9712                "buffer is too small (need {} bytes, but got {})",
9713                Self::ENCODED_LEN,
9714                __tmp.remaining(),
9715            )
9716        }
9717        __tmp.put_u32_le(self.time_boot_ms);
9718        __tmp.put_u32_le(self.general_metadata_file_crc);
9719        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9720        for val in &self.general_metadata_uri {
9721            __tmp.put_u8(*val);
9722        }
9723        for val in &self.peripherals_metadata_uri {
9724            __tmp.put_u8(*val);
9725        }
9726        if matches!(version, MavlinkVersion::V2) {
9727            let len = __tmp.len();
9728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9729        } else {
9730            __tmp.len()
9731        }
9732    }
9733}
9734#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9735#[doc = ""]
9736#[doc = "ID: 396"]
9737#[derive(Debug, Clone, PartialEq)]
9738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9740#[cfg_attr(feature = "ts", derive(TS))]
9741#[cfg_attr(feature = "ts", ts(export))]
9742pub struct COMPONENT_INFORMATION_BASIC_DATA {
9743    #[doc = "Component capability flags"]
9744    pub capabilities: MavProtocolCapability,
9745    #[doc = "Timestamp (time since system boot)."]
9746    pub time_boot_ms: u32,
9747    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9748    pub time_manufacture_s: u32,
9749    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9750    #[cfg_attr(feature = "ts", ts(type = "string"))]
9751    pub vendor_name: CharArray<32>,
9752    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9753    #[cfg_attr(feature = "ts", ts(type = "string"))]
9754    pub model_name: CharArray<32>,
9755    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9756    #[cfg_attr(feature = "ts", ts(type = "string"))]
9757    pub software_version: CharArray<24>,
9758    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9759    #[cfg_attr(feature = "ts", ts(type = "string"))]
9760    pub hardware_version: CharArray<24>,
9761    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9762    #[cfg_attr(feature = "ts", ts(type = "string"))]
9763    pub serial_number: CharArray<32>,
9764}
9765impl COMPONENT_INFORMATION_BASIC_DATA {
9766    pub const ENCODED_LEN: usize = 160usize;
9767    pub const DEFAULT: Self = Self {
9768        capabilities: MavProtocolCapability::DEFAULT,
9769        time_boot_ms: 0_u32,
9770        time_manufacture_s: 0_u32,
9771        vendor_name: CharArray::new([0_u8; 32usize]),
9772        model_name: CharArray::new([0_u8; 32usize]),
9773        software_version: CharArray::new([0_u8; 24usize]),
9774        hardware_version: CharArray::new([0_u8; 24usize]),
9775        serial_number: CharArray::new([0_u8; 32usize]),
9776    };
9777    #[cfg(feature = "arbitrary")]
9778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9779        use arbitrary::{Arbitrary, Unstructured};
9780        let mut buf = [0u8; 1024];
9781        rng.fill_bytes(&mut buf);
9782        let mut unstructured = Unstructured::new(&buf);
9783        Self::arbitrary(&mut unstructured).unwrap_or_default()
9784    }
9785}
9786impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9787    fn default() -> Self {
9788        Self::DEFAULT.clone()
9789    }
9790}
9791impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9792    type Message = MavMessage;
9793    const ID: u32 = 396u32;
9794    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9795    const EXTRA_CRC: u8 = 50u8;
9796    const ENCODED_LEN: usize = 160usize;
9797    fn deser(
9798        _version: MavlinkVersion,
9799        __input: &[u8],
9800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9801        let avail_len = __input.len();
9802        let mut payload_buf = [0; Self::ENCODED_LEN];
9803        let mut buf = if avail_len < Self::ENCODED_LEN {
9804            payload_buf[0..avail_len].copy_from_slice(__input);
9805            Bytes::new(&payload_buf)
9806        } else {
9807            Bytes::new(__input)
9808        };
9809        let mut __struct = Self::default();
9810        let tmp = buf.get_u64_le();
9811        __struct.capabilities = MavProtocolCapability::from_bits(
9812            tmp & MavProtocolCapability::all().bits(),
9813        )
9814        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9815            flag_type: "MavProtocolCapability",
9816            value: tmp as u32,
9817        })?;
9818        __struct.time_boot_ms = buf.get_u32_le();
9819        __struct.time_manufacture_s = buf.get_u32_le();
9820        let mut tmp = [0_u8; 32usize];
9821        for v in &mut tmp {
9822            *v = buf.get_u8();
9823        }
9824        __struct.vendor_name = CharArray::new(tmp);
9825        let mut tmp = [0_u8; 32usize];
9826        for v in &mut tmp {
9827            *v = buf.get_u8();
9828        }
9829        __struct.model_name = CharArray::new(tmp);
9830        let mut tmp = [0_u8; 24usize];
9831        for v in &mut tmp {
9832            *v = buf.get_u8();
9833        }
9834        __struct.software_version = CharArray::new(tmp);
9835        let mut tmp = [0_u8; 24usize];
9836        for v in &mut tmp {
9837            *v = buf.get_u8();
9838        }
9839        __struct.hardware_version = CharArray::new(tmp);
9840        let mut tmp = [0_u8; 32usize];
9841        for v in &mut tmp {
9842            *v = buf.get_u8();
9843        }
9844        __struct.serial_number = CharArray::new(tmp);
9845        Ok(__struct)
9846    }
9847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9848        let mut __tmp = BytesMut::new(bytes);
9849        #[allow(clippy::absurd_extreme_comparisons)]
9850        #[allow(unused_comparisons)]
9851        if __tmp.remaining() < Self::ENCODED_LEN {
9852            panic!(
9853                "buffer is too small (need {} bytes, but got {})",
9854                Self::ENCODED_LEN,
9855                __tmp.remaining(),
9856            )
9857        }
9858        __tmp.put_u64_le(self.capabilities.bits());
9859        __tmp.put_u32_le(self.time_boot_ms);
9860        __tmp.put_u32_le(self.time_manufacture_s);
9861        for val in &self.vendor_name {
9862            __tmp.put_u8(*val);
9863        }
9864        for val in &self.model_name {
9865            __tmp.put_u8(*val);
9866        }
9867        for val in &self.software_version {
9868            __tmp.put_u8(*val);
9869        }
9870        for val in &self.hardware_version {
9871            __tmp.put_u8(*val);
9872        }
9873        for val in &self.serial_number {
9874            __tmp.put_u8(*val);
9875        }
9876        if matches!(version, MavlinkVersion::V2) {
9877            let len = __tmp.len();
9878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9879        } else {
9880            __tmp.len()
9881        }
9882    }
9883}
9884#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9885#[doc = ""]
9886#[doc = "ID: 397"]
9887#[derive(Debug, Clone, PartialEq)]
9888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9890#[cfg_attr(feature = "ts", derive(TS))]
9891#[cfg_attr(feature = "ts", ts(export))]
9892pub struct COMPONENT_METADATA_DATA {
9893    #[doc = "Timestamp (time since system boot)."]
9894    pub time_boot_ms: u32,
9895    #[doc = "CRC32 of the general metadata file."]
9896    pub file_crc: u32,
9897    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9898    #[cfg_attr(feature = "ts", ts(type = "string"))]
9899    pub uri: CharArray<100>,
9900}
9901impl COMPONENT_METADATA_DATA {
9902    pub const ENCODED_LEN: usize = 108usize;
9903    pub const DEFAULT: Self = Self {
9904        time_boot_ms: 0_u32,
9905        file_crc: 0_u32,
9906        uri: CharArray::new([0_u8; 100usize]),
9907    };
9908    #[cfg(feature = "arbitrary")]
9909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9910        use arbitrary::{Arbitrary, Unstructured};
9911        let mut buf = [0u8; 1024];
9912        rng.fill_bytes(&mut buf);
9913        let mut unstructured = Unstructured::new(&buf);
9914        Self::arbitrary(&mut unstructured).unwrap_or_default()
9915    }
9916}
9917impl Default for COMPONENT_METADATA_DATA {
9918    fn default() -> Self {
9919        Self::DEFAULT.clone()
9920    }
9921}
9922impl MessageData for COMPONENT_METADATA_DATA {
9923    type Message = MavMessage;
9924    const ID: u32 = 397u32;
9925    const NAME: &'static str = "COMPONENT_METADATA";
9926    const EXTRA_CRC: u8 = 182u8;
9927    const ENCODED_LEN: usize = 108usize;
9928    fn deser(
9929        _version: MavlinkVersion,
9930        __input: &[u8],
9931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9932        let avail_len = __input.len();
9933        let mut payload_buf = [0; Self::ENCODED_LEN];
9934        let mut buf = if avail_len < Self::ENCODED_LEN {
9935            payload_buf[0..avail_len].copy_from_slice(__input);
9936            Bytes::new(&payload_buf)
9937        } else {
9938            Bytes::new(__input)
9939        };
9940        let mut __struct = Self::default();
9941        __struct.time_boot_ms = buf.get_u32_le();
9942        __struct.file_crc = buf.get_u32_le();
9943        let mut tmp = [0_u8; 100usize];
9944        for v in &mut tmp {
9945            *v = buf.get_u8();
9946        }
9947        __struct.uri = CharArray::new(tmp);
9948        Ok(__struct)
9949    }
9950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9951        let mut __tmp = BytesMut::new(bytes);
9952        #[allow(clippy::absurd_extreme_comparisons)]
9953        #[allow(unused_comparisons)]
9954        if __tmp.remaining() < Self::ENCODED_LEN {
9955            panic!(
9956                "buffer is too small (need {} bytes, but got {})",
9957                Self::ENCODED_LEN,
9958                __tmp.remaining(),
9959            )
9960        }
9961        __tmp.put_u32_le(self.time_boot_ms);
9962        __tmp.put_u32_le(self.file_crc);
9963        for val in &self.uri {
9964            __tmp.put_u8(*val);
9965        }
9966        if matches!(version, MavlinkVersion::V2) {
9967            let len = __tmp.len();
9968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9969        } else {
9970            __tmp.len()
9971        }
9972    }
9973}
9974#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9975#[doc = ""]
9976#[doc = "ID: 146"]
9977#[derive(Debug, Clone, PartialEq)]
9978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9980#[cfg_attr(feature = "ts", derive(TS))]
9981#[cfg_attr(feature = "ts", ts(export))]
9982pub struct CONTROL_SYSTEM_STATE_DATA {
9983    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9984    pub time_usec: u64,
9985    #[doc = "X acceleration in body frame"]
9986    pub x_acc: f32,
9987    #[doc = "Y acceleration in body frame"]
9988    pub y_acc: f32,
9989    #[doc = "Z acceleration in body frame"]
9990    pub z_acc: f32,
9991    #[doc = "X velocity in body frame"]
9992    pub x_vel: f32,
9993    #[doc = "Y velocity in body frame"]
9994    pub y_vel: f32,
9995    #[doc = "Z velocity in body frame"]
9996    pub z_vel: f32,
9997    #[doc = "X position in local frame"]
9998    pub x_pos: f32,
9999    #[doc = "Y position in local frame"]
10000    pub y_pos: f32,
10001    #[doc = "Z position in local frame"]
10002    pub z_pos: f32,
10003    #[doc = "Airspeed, set to -1 if unknown"]
10004    pub airspeed: f32,
10005    #[doc = "Variance of body velocity estimate"]
10006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10008    pub vel_variance: [f32; 3],
10009    #[doc = "Variance in local position"]
10010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10011    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10012    pub pos_variance: [f32; 3],
10013    #[doc = "The attitude, represented as Quaternion"]
10014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10016    pub q: [f32; 4],
10017    #[doc = "Angular rate in roll axis"]
10018    pub roll_rate: f32,
10019    #[doc = "Angular rate in pitch axis"]
10020    pub pitch_rate: f32,
10021    #[doc = "Angular rate in yaw axis"]
10022    pub yaw_rate: f32,
10023}
10024impl CONTROL_SYSTEM_STATE_DATA {
10025    pub const ENCODED_LEN: usize = 100usize;
10026    pub const DEFAULT: Self = Self {
10027        time_usec: 0_u64,
10028        x_acc: 0.0_f32,
10029        y_acc: 0.0_f32,
10030        z_acc: 0.0_f32,
10031        x_vel: 0.0_f32,
10032        y_vel: 0.0_f32,
10033        z_vel: 0.0_f32,
10034        x_pos: 0.0_f32,
10035        y_pos: 0.0_f32,
10036        z_pos: 0.0_f32,
10037        airspeed: 0.0_f32,
10038        vel_variance: [0.0_f32; 3usize],
10039        pos_variance: [0.0_f32; 3usize],
10040        q: [0.0_f32; 4usize],
10041        roll_rate: 0.0_f32,
10042        pitch_rate: 0.0_f32,
10043        yaw_rate: 0.0_f32,
10044    };
10045    #[cfg(feature = "arbitrary")]
10046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10047        use arbitrary::{Arbitrary, Unstructured};
10048        let mut buf = [0u8; 1024];
10049        rng.fill_bytes(&mut buf);
10050        let mut unstructured = Unstructured::new(&buf);
10051        Self::arbitrary(&mut unstructured).unwrap_or_default()
10052    }
10053}
10054impl Default for CONTROL_SYSTEM_STATE_DATA {
10055    fn default() -> Self {
10056        Self::DEFAULT.clone()
10057    }
10058}
10059impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10060    type Message = MavMessage;
10061    const ID: u32 = 146u32;
10062    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10063    const EXTRA_CRC: u8 = 103u8;
10064    const ENCODED_LEN: usize = 100usize;
10065    fn deser(
10066        _version: MavlinkVersion,
10067        __input: &[u8],
10068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10069        let avail_len = __input.len();
10070        let mut payload_buf = [0; Self::ENCODED_LEN];
10071        let mut buf = if avail_len < Self::ENCODED_LEN {
10072            payload_buf[0..avail_len].copy_from_slice(__input);
10073            Bytes::new(&payload_buf)
10074        } else {
10075            Bytes::new(__input)
10076        };
10077        let mut __struct = Self::default();
10078        __struct.time_usec = buf.get_u64_le();
10079        __struct.x_acc = buf.get_f32_le();
10080        __struct.y_acc = buf.get_f32_le();
10081        __struct.z_acc = buf.get_f32_le();
10082        __struct.x_vel = buf.get_f32_le();
10083        __struct.y_vel = buf.get_f32_le();
10084        __struct.z_vel = buf.get_f32_le();
10085        __struct.x_pos = buf.get_f32_le();
10086        __struct.y_pos = buf.get_f32_le();
10087        __struct.z_pos = buf.get_f32_le();
10088        __struct.airspeed = buf.get_f32_le();
10089        for v in &mut __struct.vel_variance {
10090            let val = buf.get_f32_le();
10091            *v = val;
10092        }
10093        for v in &mut __struct.pos_variance {
10094            let val = buf.get_f32_le();
10095            *v = val;
10096        }
10097        for v in &mut __struct.q {
10098            let val = buf.get_f32_le();
10099            *v = val;
10100        }
10101        __struct.roll_rate = buf.get_f32_le();
10102        __struct.pitch_rate = buf.get_f32_le();
10103        __struct.yaw_rate = buf.get_f32_le();
10104        Ok(__struct)
10105    }
10106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10107        let mut __tmp = BytesMut::new(bytes);
10108        #[allow(clippy::absurd_extreme_comparisons)]
10109        #[allow(unused_comparisons)]
10110        if __tmp.remaining() < Self::ENCODED_LEN {
10111            panic!(
10112                "buffer is too small (need {} bytes, but got {})",
10113                Self::ENCODED_LEN,
10114                __tmp.remaining(),
10115            )
10116        }
10117        __tmp.put_u64_le(self.time_usec);
10118        __tmp.put_f32_le(self.x_acc);
10119        __tmp.put_f32_le(self.y_acc);
10120        __tmp.put_f32_le(self.z_acc);
10121        __tmp.put_f32_le(self.x_vel);
10122        __tmp.put_f32_le(self.y_vel);
10123        __tmp.put_f32_le(self.z_vel);
10124        __tmp.put_f32_le(self.x_pos);
10125        __tmp.put_f32_le(self.y_pos);
10126        __tmp.put_f32_le(self.z_pos);
10127        __tmp.put_f32_le(self.airspeed);
10128        for val in &self.vel_variance {
10129            __tmp.put_f32_le(*val);
10130        }
10131        for val in &self.pos_variance {
10132            __tmp.put_f32_le(*val);
10133        }
10134        for val in &self.q {
10135            __tmp.put_f32_le(*val);
10136        }
10137        __tmp.put_f32_le(self.roll_rate);
10138        __tmp.put_f32_le(self.pitch_rate);
10139        __tmp.put_f32_le(self.yaw_rate);
10140        if matches!(version, MavlinkVersion::V2) {
10141            let len = __tmp.len();
10142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10143        } else {
10144            __tmp.len()
10145        }
10146    }
10147}
10148#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10149#[doc = ""]
10150#[doc = "ID: 411"]
10151#[derive(Debug, Clone, PartialEq)]
10152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10154#[cfg_attr(feature = "ts", derive(TS))]
10155#[cfg_attr(feature = "ts", ts(export))]
10156pub struct CURRENT_EVENT_SEQUENCE_DATA {
10157    #[doc = "Sequence number."]
10158    pub sequence: u16,
10159    #[doc = "Flag bitset."]
10160    pub flags: MavEventCurrentSequenceFlags,
10161}
10162impl CURRENT_EVENT_SEQUENCE_DATA {
10163    pub const ENCODED_LEN: usize = 3usize;
10164    pub const DEFAULT: Self = Self {
10165        sequence: 0_u16,
10166        flags: MavEventCurrentSequenceFlags::DEFAULT,
10167    };
10168    #[cfg(feature = "arbitrary")]
10169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10170        use arbitrary::{Arbitrary, Unstructured};
10171        let mut buf = [0u8; 1024];
10172        rng.fill_bytes(&mut buf);
10173        let mut unstructured = Unstructured::new(&buf);
10174        Self::arbitrary(&mut unstructured).unwrap_or_default()
10175    }
10176}
10177impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10178    fn default() -> Self {
10179        Self::DEFAULT.clone()
10180    }
10181}
10182impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10183    type Message = MavMessage;
10184    const ID: u32 = 411u32;
10185    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10186    const EXTRA_CRC: u8 = 106u8;
10187    const ENCODED_LEN: usize = 3usize;
10188    fn deser(
10189        _version: MavlinkVersion,
10190        __input: &[u8],
10191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10192        let avail_len = __input.len();
10193        let mut payload_buf = [0; Self::ENCODED_LEN];
10194        let mut buf = if avail_len < Self::ENCODED_LEN {
10195            payload_buf[0..avail_len].copy_from_slice(__input);
10196            Bytes::new(&payload_buf)
10197        } else {
10198            Bytes::new(__input)
10199        };
10200        let mut __struct = Self::default();
10201        __struct.sequence = buf.get_u16_le();
10202        let tmp = buf.get_u8();
10203        __struct.flags =
10204            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10205                enum_type: "MavEventCurrentSequenceFlags",
10206                value: tmp as u32,
10207            })?;
10208        Ok(__struct)
10209    }
10210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10211        let mut __tmp = BytesMut::new(bytes);
10212        #[allow(clippy::absurd_extreme_comparisons)]
10213        #[allow(unused_comparisons)]
10214        if __tmp.remaining() < Self::ENCODED_LEN {
10215            panic!(
10216                "buffer is too small (need {} bytes, but got {})",
10217                Self::ENCODED_LEN,
10218                __tmp.remaining(),
10219            )
10220        }
10221        __tmp.put_u16_le(self.sequence);
10222        __tmp.put_u8(self.flags as u8);
10223        if matches!(version, MavlinkVersion::V2) {
10224            let len = __tmp.len();
10225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10226        } else {
10227            __tmp.len()
10228        }
10229    }
10230}
10231#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10232#[doc = ""]
10233#[doc = "ID: 436"]
10234#[derive(Debug, Clone, PartialEq)]
10235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10237#[cfg_attr(feature = "ts", derive(TS))]
10238#[cfg_attr(feature = "ts", ts(export))]
10239pub struct CURRENT_MODE_DATA {
10240    #[doc = "A bitfield for use for autopilot-specific flags"]
10241    pub custom_mode: u32,
10242    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10243    pub intended_custom_mode: u32,
10244    #[doc = "Standard mode."]
10245    pub standard_mode: MavStandardMode,
10246}
10247impl CURRENT_MODE_DATA {
10248    pub const ENCODED_LEN: usize = 9usize;
10249    pub const DEFAULT: Self = Self {
10250        custom_mode: 0_u32,
10251        intended_custom_mode: 0_u32,
10252        standard_mode: MavStandardMode::DEFAULT,
10253    };
10254    #[cfg(feature = "arbitrary")]
10255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10256        use arbitrary::{Arbitrary, Unstructured};
10257        let mut buf = [0u8; 1024];
10258        rng.fill_bytes(&mut buf);
10259        let mut unstructured = Unstructured::new(&buf);
10260        Self::arbitrary(&mut unstructured).unwrap_or_default()
10261    }
10262}
10263impl Default for CURRENT_MODE_DATA {
10264    fn default() -> Self {
10265        Self::DEFAULT.clone()
10266    }
10267}
10268impl MessageData for CURRENT_MODE_DATA {
10269    type Message = MavMessage;
10270    const ID: u32 = 436u32;
10271    const NAME: &'static str = "CURRENT_MODE";
10272    const EXTRA_CRC: u8 = 193u8;
10273    const ENCODED_LEN: usize = 9usize;
10274    fn deser(
10275        _version: MavlinkVersion,
10276        __input: &[u8],
10277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10278        let avail_len = __input.len();
10279        let mut payload_buf = [0; Self::ENCODED_LEN];
10280        let mut buf = if avail_len < Self::ENCODED_LEN {
10281            payload_buf[0..avail_len].copy_from_slice(__input);
10282            Bytes::new(&payload_buf)
10283        } else {
10284            Bytes::new(__input)
10285        };
10286        let mut __struct = Self::default();
10287        __struct.custom_mode = buf.get_u32_le();
10288        __struct.intended_custom_mode = buf.get_u32_le();
10289        let tmp = buf.get_u8();
10290        __struct.standard_mode =
10291            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10292                enum_type: "MavStandardMode",
10293                value: tmp as u32,
10294            })?;
10295        Ok(__struct)
10296    }
10297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10298        let mut __tmp = BytesMut::new(bytes);
10299        #[allow(clippy::absurd_extreme_comparisons)]
10300        #[allow(unused_comparisons)]
10301        if __tmp.remaining() < Self::ENCODED_LEN {
10302            panic!(
10303                "buffer is too small (need {} bytes, but got {})",
10304                Self::ENCODED_LEN,
10305                __tmp.remaining(),
10306            )
10307        }
10308        __tmp.put_u32_le(self.custom_mode);
10309        __tmp.put_u32_le(self.intended_custom_mode);
10310        __tmp.put_u8(self.standard_mode as u8);
10311        if matches!(version, MavlinkVersion::V2) {
10312            let len = __tmp.len();
10313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10314        } else {
10315            __tmp.len()
10316        }
10317    }
10318}
10319#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10320#[doc = "Data stream status information."]
10321#[doc = ""]
10322#[doc = "ID: 67"]
10323#[derive(Debug, Clone, PartialEq)]
10324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10326#[cfg_attr(feature = "ts", derive(TS))]
10327#[cfg_attr(feature = "ts", ts(export))]
10328pub struct DATA_STREAM_DATA {
10329    #[doc = "The message rate"]
10330    pub message_rate: u16,
10331    #[doc = "The ID of the requested data stream"]
10332    pub stream_id: u8,
10333    #[doc = "1 stream is enabled, 0 stream is stopped."]
10334    pub on_off: u8,
10335}
10336impl DATA_STREAM_DATA {
10337    pub const ENCODED_LEN: usize = 4usize;
10338    pub const DEFAULT: Self = Self {
10339        message_rate: 0_u16,
10340        stream_id: 0_u8,
10341        on_off: 0_u8,
10342    };
10343    #[cfg(feature = "arbitrary")]
10344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10345        use arbitrary::{Arbitrary, Unstructured};
10346        let mut buf = [0u8; 1024];
10347        rng.fill_bytes(&mut buf);
10348        let mut unstructured = Unstructured::new(&buf);
10349        Self::arbitrary(&mut unstructured).unwrap_or_default()
10350    }
10351}
10352impl Default for DATA_STREAM_DATA {
10353    fn default() -> Self {
10354        Self::DEFAULT.clone()
10355    }
10356}
10357impl MessageData for DATA_STREAM_DATA {
10358    type Message = MavMessage;
10359    const ID: u32 = 67u32;
10360    const NAME: &'static str = "DATA_STREAM";
10361    const EXTRA_CRC: u8 = 21u8;
10362    const ENCODED_LEN: usize = 4usize;
10363    fn deser(
10364        _version: MavlinkVersion,
10365        __input: &[u8],
10366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10367        let avail_len = __input.len();
10368        let mut payload_buf = [0; Self::ENCODED_LEN];
10369        let mut buf = if avail_len < Self::ENCODED_LEN {
10370            payload_buf[0..avail_len].copy_from_slice(__input);
10371            Bytes::new(&payload_buf)
10372        } else {
10373            Bytes::new(__input)
10374        };
10375        let mut __struct = Self::default();
10376        __struct.message_rate = buf.get_u16_le();
10377        __struct.stream_id = buf.get_u8();
10378        __struct.on_off = buf.get_u8();
10379        Ok(__struct)
10380    }
10381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10382        let mut __tmp = BytesMut::new(bytes);
10383        #[allow(clippy::absurd_extreme_comparisons)]
10384        #[allow(unused_comparisons)]
10385        if __tmp.remaining() < Self::ENCODED_LEN {
10386            panic!(
10387                "buffer is too small (need {} bytes, but got {})",
10388                Self::ENCODED_LEN,
10389                __tmp.remaining(),
10390            )
10391        }
10392        __tmp.put_u16_le(self.message_rate);
10393        __tmp.put_u8(self.stream_id);
10394        __tmp.put_u8(self.on_off);
10395        if matches!(version, MavlinkVersion::V2) {
10396            let len = __tmp.len();
10397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10398        } else {
10399            __tmp.len()
10400        }
10401    }
10402}
10403#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10404#[doc = ""]
10405#[doc = "ID: 130"]
10406#[derive(Debug, Clone, PartialEq)]
10407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10409#[cfg_attr(feature = "ts", derive(TS))]
10410#[cfg_attr(feature = "ts", ts(export))]
10411pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10412    #[doc = "total data size (set on ACK only)."]
10413    pub size: u32,
10414    #[doc = "Width of a matrix or image."]
10415    pub width: u16,
10416    #[doc = "Height of a matrix or image."]
10417    pub height: u16,
10418    #[doc = "Number of packets being sent (set on ACK only)."]
10419    pub packets: u16,
10420    #[doc = "Type of requested/acknowledged data."]
10421    pub mavtype: MavlinkDataStreamType,
10422    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10423    pub payload: u8,
10424    #[doc = "JPEG quality. Values: [1-100]."]
10425    pub jpg_quality: u8,
10426}
10427impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10428    pub const ENCODED_LEN: usize = 13usize;
10429    pub const DEFAULT: Self = Self {
10430        size: 0_u32,
10431        width: 0_u16,
10432        height: 0_u16,
10433        packets: 0_u16,
10434        mavtype: MavlinkDataStreamType::DEFAULT,
10435        payload: 0_u8,
10436        jpg_quality: 0_u8,
10437    };
10438    #[cfg(feature = "arbitrary")]
10439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10440        use arbitrary::{Arbitrary, Unstructured};
10441        let mut buf = [0u8; 1024];
10442        rng.fill_bytes(&mut buf);
10443        let mut unstructured = Unstructured::new(&buf);
10444        Self::arbitrary(&mut unstructured).unwrap_or_default()
10445    }
10446}
10447impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10448    fn default() -> Self {
10449        Self::DEFAULT.clone()
10450    }
10451}
10452impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10453    type Message = MavMessage;
10454    const ID: u32 = 130u32;
10455    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10456    const EXTRA_CRC: u8 = 29u8;
10457    const ENCODED_LEN: usize = 13usize;
10458    fn deser(
10459        _version: MavlinkVersion,
10460        __input: &[u8],
10461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10462        let avail_len = __input.len();
10463        let mut payload_buf = [0; Self::ENCODED_LEN];
10464        let mut buf = if avail_len < Self::ENCODED_LEN {
10465            payload_buf[0..avail_len].copy_from_slice(__input);
10466            Bytes::new(&payload_buf)
10467        } else {
10468            Bytes::new(__input)
10469        };
10470        let mut __struct = Self::default();
10471        __struct.size = buf.get_u32_le();
10472        __struct.width = buf.get_u16_le();
10473        __struct.height = buf.get_u16_le();
10474        __struct.packets = buf.get_u16_le();
10475        let tmp = buf.get_u8();
10476        __struct.mavtype =
10477            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10478                enum_type: "MavlinkDataStreamType",
10479                value: tmp as u32,
10480            })?;
10481        __struct.payload = buf.get_u8();
10482        __struct.jpg_quality = buf.get_u8();
10483        Ok(__struct)
10484    }
10485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10486        let mut __tmp = BytesMut::new(bytes);
10487        #[allow(clippy::absurd_extreme_comparisons)]
10488        #[allow(unused_comparisons)]
10489        if __tmp.remaining() < Self::ENCODED_LEN {
10490            panic!(
10491                "buffer is too small (need {} bytes, but got {})",
10492                Self::ENCODED_LEN,
10493                __tmp.remaining(),
10494            )
10495        }
10496        __tmp.put_u32_le(self.size);
10497        __tmp.put_u16_le(self.width);
10498        __tmp.put_u16_le(self.height);
10499        __tmp.put_u16_le(self.packets);
10500        __tmp.put_u8(self.mavtype as u8);
10501        __tmp.put_u8(self.payload);
10502        __tmp.put_u8(self.jpg_quality);
10503        if matches!(version, MavlinkVersion::V2) {
10504            let len = __tmp.len();
10505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10506        } else {
10507            __tmp.len()
10508        }
10509    }
10510}
10511#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10512#[doc = ""]
10513#[doc = "ID: 254"]
10514#[derive(Debug, Clone, PartialEq)]
10515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10517#[cfg_attr(feature = "ts", derive(TS))]
10518#[cfg_attr(feature = "ts", ts(export))]
10519pub struct DEBUG_DATA {
10520    #[doc = "Timestamp (time since system boot)."]
10521    pub time_boot_ms: u32,
10522    #[doc = "DEBUG value"]
10523    pub value: f32,
10524    #[doc = "index of debug variable"]
10525    pub ind: u8,
10526}
10527impl DEBUG_DATA {
10528    pub const ENCODED_LEN: usize = 9usize;
10529    pub const DEFAULT: Self = Self {
10530        time_boot_ms: 0_u32,
10531        value: 0.0_f32,
10532        ind: 0_u8,
10533    };
10534    #[cfg(feature = "arbitrary")]
10535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10536        use arbitrary::{Arbitrary, Unstructured};
10537        let mut buf = [0u8; 1024];
10538        rng.fill_bytes(&mut buf);
10539        let mut unstructured = Unstructured::new(&buf);
10540        Self::arbitrary(&mut unstructured).unwrap_or_default()
10541    }
10542}
10543impl Default for DEBUG_DATA {
10544    fn default() -> Self {
10545        Self::DEFAULT.clone()
10546    }
10547}
10548impl MessageData for DEBUG_DATA {
10549    type Message = MavMessage;
10550    const ID: u32 = 254u32;
10551    const NAME: &'static str = "DEBUG";
10552    const EXTRA_CRC: u8 = 46u8;
10553    const ENCODED_LEN: usize = 9usize;
10554    fn deser(
10555        _version: MavlinkVersion,
10556        __input: &[u8],
10557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10558        let avail_len = __input.len();
10559        let mut payload_buf = [0; Self::ENCODED_LEN];
10560        let mut buf = if avail_len < Self::ENCODED_LEN {
10561            payload_buf[0..avail_len].copy_from_slice(__input);
10562            Bytes::new(&payload_buf)
10563        } else {
10564            Bytes::new(__input)
10565        };
10566        let mut __struct = Self::default();
10567        __struct.time_boot_ms = buf.get_u32_le();
10568        __struct.value = buf.get_f32_le();
10569        __struct.ind = buf.get_u8();
10570        Ok(__struct)
10571    }
10572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10573        let mut __tmp = BytesMut::new(bytes);
10574        #[allow(clippy::absurd_extreme_comparisons)]
10575        #[allow(unused_comparisons)]
10576        if __tmp.remaining() < Self::ENCODED_LEN {
10577            panic!(
10578                "buffer is too small (need {} bytes, but got {})",
10579                Self::ENCODED_LEN,
10580                __tmp.remaining(),
10581            )
10582        }
10583        __tmp.put_u32_le(self.time_boot_ms);
10584        __tmp.put_f32_le(self.value);
10585        __tmp.put_u8(self.ind);
10586        if matches!(version, MavlinkVersion::V2) {
10587            let len = __tmp.len();
10588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10589        } else {
10590            __tmp.len()
10591        }
10592    }
10593}
10594#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10595#[doc = ""]
10596#[doc = "ID: 350"]
10597#[derive(Debug, Clone, PartialEq)]
10598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10600#[cfg_attr(feature = "ts", derive(TS))]
10601#[cfg_attr(feature = "ts", ts(export))]
10602pub struct DEBUG_FLOAT_ARRAY_DATA {
10603    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10604    pub time_usec: u64,
10605    #[doc = "Unique ID used to discriminate between arrays"]
10606    pub array_id: u16,
10607    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10608    #[cfg_attr(feature = "ts", ts(type = "string"))]
10609    pub name: CharArray<10>,
10610    #[doc = "data"]
10611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10612    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10613    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10614    pub data: [f32; 58],
10615}
10616impl DEBUG_FLOAT_ARRAY_DATA {
10617    pub const ENCODED_LEN: usize = 252usize;
10618    pub const DEFAULT: Self = Self {
10619        time_usec: 0_u64,
10620        array_id: 0_u16,
10621        name: CharArray::new([0_u8; 10usize]),
10622        data: [0.0_f32; 58usize],
10623    };
10624    #[cfg(feature = "arbitrary")]
10625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10626        use arbitrary::{Arbitrary, Unstructured};
10627        let mut buf = [0u8; 1024];
10628        rng.fill_bytes(&mut buf);
10629        let mut unstructured = Unstructured::new(&buf);
10630        Self::arbitrary(&mut unstructured).unwrap_or_default()
10631    }
10632}
10633impl Default for DEBUG_FLOAT_ARRAY_DATA {
10634    fn default() -> Self {
10635        Self::DEFAULT.clone()
10636    }
10637}
10638impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10639    type Message = MavMessage;
10640    const ID: u32 = 350u32;
10641    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10642    const EXTRA_CRC: u8 = 232u8;
10643    const ENCODED_LEN: usize = 252usize;
10644    fn deser(
10645        _version: MavlinkVersion,
10646        __input: &[u8],
10647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10648        let avail_len = __input.len();
10649        let mut payload_buf = [0; Self::ENCODED_LEN];
10650        let mut buf = if avail_len < Self::ENCODED_LEN {
10651            payload_buf[0..avail_len].copy_from_slice(__input);
10652            Bytes::new(&payload_buf)
10653        } else {
10654            Bytes::new(__input)
10655        };
10656        let mut __struct = Self::default();
10657        __struct.time_usec = buf.get_u64_le();
10658        __struct.array_id = buf.get_u16_le();
10659        let mut tmp = [0_u8; 10usize];
10660        for v in &mut tmp {
10661            *v = buf.get_u8();
10662        }
10663        __struct.name = CharArray::new(tmp);
10664        for v in &mut __struct.data {
10665            let val = buf.get_f32_le();
10666            *v = val;
10667        }
10668        Ok(__struct)
10669    }
10670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10671        let mut __tmp = BytesMut::new(bytes);
10672        #[allow(clippy::absurd_extreme_comparisons)]
10673        #[allow(unused_comparisons)]
10674        if __tmp.remaining() < Self::ENCODED_LEN {
10675            panic!(
10676                "buffer is too small (need {} bytes, but got {})",
10677                Self::ENCODED_LEN,
10678                __tmp.remaining(),
10679            )
10680        }
10681        __tmp.put_u64_le(self.time_usec);
10682        __tmp.put_u16_le(self.array_id);
10683        for val in &self.name {
10684            __tmp.put_u8(*val);
10685        }
10686        if matches!(version, MavlinkVersion::V2) {
10687            for val in &self.data {
10688                __tmp.put_f32_le(*val);
10689            }
10690            let len = __tmp.len();
10691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10692        } else {
10693            __tmp.len()
10694        }
10695    }
10696}
10697#[doc = "To debug something using a named 3D vector."]
10698#[doc = ""]
10699#[doc = "ID: 250"]
10700#[derive(Debug, Clone, PartialEq)]
10701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10703#[cfg_attr(feature = "ts", derive(TS))]
10704#[cfg_attr(feature = "ts", ts(export))]
10705pub struct DEBUG_VECT_DATA {
10706    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10707    pub time_usec: u64,
10708    #[doc = "x"]
10709    pub x: f32,
10710    #[doc = "y"]
10711    pub y: f32,
10712    #[doc = "z"]
10713    pub z: f32,
10714    #[doc = "Name"]
10715    #[cfg_attr(feature = "ts", ts(type = "string"))]
10716    pub name: CharArray<10>,
10717}
10718impl DEBUG_VECT_DATA {
10719    pub const ENCODED_LEN: usize = 30usize;
10720    pub const DEFAULT: Self = Self {
10721        time_usec: 0_u64,
10722        x: 0.0_f32,
10723        y: 0.0_f32,
10724        z: 0.0_f32,
10725        name: CharArray::new([0_u8; 10usize]),
10726    };
10727    #[cfg(feature = "arbitrary")]
10728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10729        use arbitrary::{Arbitrary, Unstructured};
10730        let mut buf = [0u8; 1024];
10731        rng.fill_bytes(&mut buf);
10732        let mut unstructured = Unstructured::new(&buf);
10733        Self::arbitrary(&mut unstructured).unwrap_or_default()
10734    }
10735}
10736impl Default for DEBUG_VECT_DATA {
10737    fn default() -> Self {
10738        Self::DEFAULT.clone()
10739    }
10740}
10741impl MessageData for DEBUG_VECT_DATA {
10742    type Message = MavMessage;
10743    const ID: u32 = 250u32;
10744    const NAME: &'static str = "DEBUG_VECT";
10745    const EXTRA_CRC: u8 = 49u8;
10746    const ENCODED_LEN: usize = 30usize;
10747    fn deser(
10748        _version: MavlinkVersion,
10749        __input: &[u8],
10750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10751        let avail_len = __input.len();
10752        let mut payload_buf = [0; Self::ENCODED_LEN];
10753        let mut buf = if avail_len < Self::ENCODED_LEN {
10754            payload_buf[0..avail_len].copy_from_slice(__input);
10755            Bytes::new(&payload_buf)
10756        } else {
10757            Bytes::new(__input)
10758        };
10759        let mut __struct = Self::default();
10760        __struct.time_usec = buf.get_u64_le();
10761        __struct.x = buf.get_f32_le();
10762        __struct.y = buf.get_f32_le();
10763        __struct.z = buf.get_f32_le();
10764        let mut tmp = [0_u8; 10usize];
10765        for v in &mut tmp {
10766            *v = buf.get_u8();
10767        }
10768        __struct.name = CharArray::new(tmp);
10769        Ok(__struct)
10770    }
10771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10772        let mut __tmp = BytesMut::new(bytes);
10773        #[allow(clippy::absurd_extreme_comparisons)]
10774        #[allow(unused_comparisons)]
10775        if __tmp.remaining() < Self::ENCODED_LEN {
10776            panic!(
10777                "buffer is too small (need {} bytes, but got {})",
10778                Self::ENCODED_LEN,
10779                __tmp.remaining(),
10780            )
10781        }
10782        __tmp.put_u64_le(self.time_usec);
10783        __tmp.put_f32_le(self.x);
10784        __tmp.put_f32_le(self.y);
10785        __tmp.put_f32_le(self.z);
10786        for val in &self.name {
10787            __tmp.put_u8(*val);
10788        }
10789        if matches!(version, MavlinkVersion::V2) {
10790            let len = __tmp.len();
10791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10792        } else {
10793            __tmp.len()
10794        }
10795    }
10796}
10797#[doc = "Distance sensor information for an onboard rangefinder."]
10798#[doc = ""]
10799#[doc = "ID: 132"]
10800#[derive(Debug, Clone, PartialEq)]
10801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10803#[cfg_attr(feature = "ts", derive(TS))]
10804#[cfg_attr(feature = "ts", ts(export))]
10805pub struct DISTANCE_SENSOR_DATA {
10806    #[doc = "Timestamp (time since system boot)."]
10807    pub time_boot_ms: u32,
10808    #[doc = "Minimum distance the sensor can measure"]
10809    pub min_distance: u16,
10810    #[doc = "Maximum distance the sensor can measure"]
10811    pub max_distance: u16,
10812    #[doc = "Current distance reading"]
10813    pub current_distance: u16,
10814    #[doc = "Type of distance sensor."]
10815    pub mavtype: MavDistanceSensor,
10816    #[doc = "Onboard ID of the sensor"]
10817    pub id: u8,
10818    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10819    pub orientation: MavSensorOrientation,
10820    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10821    pub covariance: u8,
10822    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10824    pub horizontal_fov: f32,
10825    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10827    pub vertical_fov: f32,
10828    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10831    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10832    pub quaternion: [f32; 4],
10833    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10834    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10835    pub signal_quality: u8,
10836}
10837impl DISTANCE_SENSOR_DATA {
10838    pub const ENCODED_LEN: usize = 39usize;
10839    pub const DEFAULT: Self = Self {
10840        time_boot_ms: 0_u32,
10841        min_distance: 0_u16,
10842        max_distance: 0_u16,
10843        current_distance: 0_u16,
10844        mavtype: MavDistanceSensor::DEFAULT,
10845        id: 0_u8,
10846        orientation: MavSensorOrientation::DEFAULT,
10847        covariance: 0_u8,
10848        horizontal_fov: 0.0_f32,
10849        vertical_fov: 0.0_f32,
10850        quaternion: [0.0_f32; 4usize],
10851        signal_quality: 0_u8,
10852    };
10853    #[cfg(feature = "arbitrary")]
10854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10855        use arbitrary::{Arbitrary, Unstructured};
10856        let mut buf = [0u8; 1024];
10857        rng.fill_bytes(&mut buf);
10858        let mut unstructured = Unstructured::new(&buf);
10859        Self::arbitrary(&mut unstructured).unwrap_or_default()
10860    }
10861}
10862impl Default for DISTANCE_SENSOR_DATA {
10863    fn default() -> Self {
10864        Self::DEFAULT.clone()
10865    }
10866}
10867impl MessageData for DISTANCE_SENSOR_DATA {
10868    type Message = MavMessage;
10869    const ID: u32 = 132u32;
10870    const NAME: &'static str = "DISTANCE_SENSOR";
10871    const EXTRA_CRC: u8 = 85u8;
10872    const ENCODED_LEN: usize = 39usize;
10873    fn deser(
10874        _version: MavlinkVersion,
10875        __input: &[u8],
10876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10877        let avail_len = __input.len();
10878        let mut payload_buf = [0; Self::ENCODED_LEN];
10879        let mut buf = if avail_len < Self::ENCODED_LEN {
10880            payload_buf[0..avail_len].copy_from_slice(__input);
10881            Bytes::new(&payload_buf)
10882        } else {
10883            Bytes::new(__input)
10884        };
10885        let mut __struct = Self::default();
10886        __struct.time_boot_ms = buf.get_u32_le();
10887        __struct.min_distance = buf.get_u16_le();
10888        __struct.max_distance = buf.get_u16_le();
10889        __struct.current_distance = buf.get_u16_le();
10890        let tmp = buf.get_u8();
10891        __struct.mavtype =
10892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10893                enum_type: "MavDistanceSensor",
10894                value: tmp as u32,
10895            })?;
10896        __struct.id = buf.get_u8();
10897        let tmp = buf.get_u8();
10898        __struct.orientation =
10899            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10900                enum_type: "MavSensorOrientation",
10901                value: tmp as u32,
10902            })?;
10903        __struct.covariance = buf.get_u8();
10904        __struct.horizontal_fov = buf.get_f32_le();
10905        __struct.vertical_fov = buf.get_f32_le();
10906        for v in &mut __struct.quaternion {
10907            let val = buf.get_f32_le();
10908            *v = val;
10909        }
10910        __struct.signal_quality = buf.get_u8();
10911        Ok(__struct)
10912    }
10913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10914        let mut __tmp = BytesMut::new(bytes);
10915        #[allow(clippy::absurd_extreme_comparisons)]
10916        #[allow(unused_comparisons)]
10917        if __tmp.remaining() < Self::ENCODED_LEN {
10918            panic!(
10919                "buffer is too small (need {} bytes, but got {})",
10920                Self::ENCODED_LEN,
10921                __tmp.remaining(),
10922            )
10923        }
10924        __tmp.put_u32_le(self.time_boot_ms);
10925        __tmp.put_u16_le(self.min_distance);
10926        __tmp.put_u16_le(self.max_distance);
10927        __tmp.put_u16_le(self.current_distance);
10928        __tmp.put_u8(self.mavtype as u8);
10929        __tmp.put_u8(self.id);
10930        __tmp.put_u8(self.orientation as u8);
10931        __tmp.put_u8(self.covariance);
10932        if matches!(version, MavlinkVersion::V2) {
10933            __tmp.put_f32_le(self.horizontal_fov);
10934            __tmp.put_f32_le(self.vertical_fov);
10935            for val in &self.quaternion {
10936                __tmp.put_f32_le(*val);
10937            }
10938            __tmp.put_u8(self.signal_quality);
10939            let len = __tmp.len();
10940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10941        } else {
10942            __tmp.len()
10943        }
10944    }
10945}
10946#[doc = "EFI status output."]
10947#[doc = ""]
10948#[doc = "ID: 225"]
10949#[derive(Debug, Clone, PartialEq)]
10950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10952#[cfg_attr(feature = "ts", derive(TS))]
10953#[cfg_attr(feature = "ts", ts(export))]
10954pub struct EFI_STATUS_DATA {
10955    #[doc = "ECU index"]
10956    pub ecu_index: f32,
10957    #[doc = "RPM"]
10958    pub rpm: f32,
10959    #[doc = "Fuel consumed"]
10960    pub fuel_consumed: f32,
10961    #[doc = "Fuel flow rate"]
10962    pub fuel_flow: f32,
10963    #[doc = "Engine load"]
10964    pub engine_load: f32,
10965    #[doc = "Throttle position"]
10966    pub throttle_position: f32,
10967    #[doc = "Spark dwell time"]
10968    pub spark_dwell_time: f32,
10969    #[doc = "Barometric pressure"]
10970    pub barometric_pressure: f32,
10971    #[doc = "Intake manifold pressure("]
10972    pub intake_manifold_pressure: f32,
10973    #[doc = "Intake manifold temperature"]
10974    pub intake_manifold_temperature: f32,
10975    #[doc = "Cylinder head temperature"]
10976    pub cylinder_head_temperature: f32,
10977    #[doc = "Ignition timing (Crank angle degrees)"]
10978    pub ignition_timing: f32,
10979    #[doc = "Injection time"]
10980    pub injection_time: f32,
10981    #[doc = "Exhaust gas temperature"]
10982    pub exhaust_gas_temperature: f32,
10983    #[doc = "Output throttle"]
10984    pub throttle_out: f32,
10985    #[doc = "Pressure/temperature compensation"]
10986    pub pt_compensation: f32,
10987    #[doc = "EFI health status"]
10988    pub health: u8,
10989    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10990    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10991    pub ignition_voltage: f32,
10992    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10993    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10994    pub fuel_pressure: f32,
10995}
10996impl EFI_STATUS_DATA {
10997    pub const ENCODED_LEN: usize = 73usize;
10998    pub const DEFAULT: Self = Self {
10999        ecu_index: 0.0_f32,
11000        rpm: 0.0_f32,
11001        fuel_consumed: 0.0_f32,
11002        fuel_flow: 0.0_f32,
11003        engine_load: 0.0_f32,
11004        throttle_position: 0.0_f32,
11005        spark_dwell_time: 0.0_f32,
11006        barometric_pressure: 0.0_f32,
11007        intake_manifold_pressure: 0.0_f32,
11008        intake_manifold_temperature: 0.0_f32,
11009        cylinder_head_temperature: 0.0_f32,
11010        ignition_timing: 0.0_f32,
11011        injection_time: 0.0_f32,
11012        exhaust_gas_temperature: 0.0_f32,
11013        throttle_out: 0.0_f32,
11014        pt_compensation: 0.0_f32,
11015        health: 0_u8,
11016        ignition_voltage: 0.0_f32,
11017        fuel_pressure: 0.0_f32,
11018    };
11019    #[cfg(feature = "arbitrary")]
11020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11021        use arbitrary::{Arbitrary, Unstructured};
11022        let mut buf = [0u8; 1024];
11023        rng.fill_bytes(&mut buf);
11024        let mut unstructured = Unstructured::new(&buf);
11025        Self::arbitrary(&mut unstructured).unwrap_or_default()
11026    }
11027}
11028impl Default for EFI_STATUS_DATA {
11029    fn default() -> Self {
11030        Self::DEFAULT.clone()
11031    }
11032}
11033impl MessageData for EFI_STATUS_DATA {
11034    type Message = MavMessage;
11035    const ID: u32 = 225u32;
11036    const NAME: &'static str = "EFI_STATUS";
11037    const EXTRA_CRC: u8 = 208u8;
11038    const ENCODED_LEN: usize = 73usize;
11039    fn deser(
11040        _version: MavlinkVersion,
11041        __input: &[u8],
11042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11043        let avail_len = __input.len();
11044        let mut payload_buf = [0; Self::ENCODED_LEN];
11045        let mut buf = if avail_len < Self::ENCODED_LEN {
11046            payload_buf[0..avail_len].copy_from_slice(__input);
11047            Bytes::new(&payload_buf)
11048        } else {
11049            Bytes::new(__input)
11050        };
11051        let mut __struct = Self::default();
11052        __struct.ecu_index = buf.get_f32_le();
11053        __struct.rpm = buf.get_f32_le();
11054        __struct.fuel_consumed = buf.get_f32_le();
11055        __struct.fuel_flow = buf.get_f32_le();
11056        __struct.engine_load = buf.get_f32_le();
11057        __struct.throttle_position = buf.get_f32_le();
11058        __struct.spark_dwell_time = buf.get_f32_le();
11059        __struct.barometric_pressure = buf.get_f32_le();
11060        __struct.intake_manifold_pressure = buf.get_f32_le();
11061        __struct.intake_manifold_temperature = buf.get_f32_le();
11062        __struct.cylinder_head_temperature = buf.get_f32_le();
11063        __struct.ignition_timing = buf.get_f32_le();
11064        __struct.injection_time = buf.get_f32_le();
11065        __struct.exhaust_gas_temperature = buf.get_f32_le();
11066        __struct.throttle_out = buf.get_f32_le();
11067        __struct.pt_compensation = buf.get_f32_le();
11068        __struct.health = buf.get_u8();
11069        __struct.ignition_voltage = buf.get_f32_le();
11070        __struct.fuel_pressure = buf.get_f32_le();
11071        Ok(__struct)
11072    }
11073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11074        let mut __tmp = BytesMut::new(bytes);
11075        #[allow(clippy::absurd_extreme_comparisons)]
11076        #[allow(unused_comparisons)]
11077        if __tmp.remaining() < Self::ENCODED_LEN {
11078            panic!(
11079                "buffer is too small (need {} bytes, but got {})",
11080                Self::ENCODED_LEN,
11081                __tmp.remaining(),
11082            )
11083        }
11084        __tmp.put_f32_le(self.ecu_index);
11085        __tmp.put_f32_le(self.rpm);
11086        __tmp.put_f32_le(self.fuel_consumed);
11087        __tmp.put_f32_le(self.fuel_flow);
11088        __tmp.put_f32_le(self.engine_load);
11089        __tmp.put_f32_le(self.throttle_position);
11090        __tmp.put_f32_le(self.spark_dwell_time);
11091        __tmp.put_f32_le(self.barometric_pressure);
11092        __tmp.put_f32_le(self.intake_manifold_pressure);
11093        __tmp.put_f32_le(self.intake_manifold_temperature);
11094        __tmp.put_f32_le(self.cylinder_head_temperature);
11095        __tmp.put_f32_le(self.ignition_timing);
11096        __tmp.put_f32_le(self.injection_time);
11097        __tmp.put_f32_le(self.exhaust_gas_temperature);
11098        __tmp.put_f32_le(self.throttle_out);
11099        __tmp.put_f32_le(self.pt_compensation);
11100        __tmp.put_u8(self.health);
11101        if matches!(version, MavlinkVersion::V2) {
11102            __tmp.put_f32_le(self.ignition_voltage);
11103            __tmp.put_f32_le(self.fuel_pressure);
11104            let len = __tmp.len();
11105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11106        } else {
11107            __tmp.len()
11108        }
11109    }
11110}
11111#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11112#[doc = ""]
11113#[doc = "ID: 131"]
11114#[derive(Debug, Clone, PartialEq)]
11115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11117#[cfg_attr(feature = "ts", derive(TS))]
11118#[cfg_attr(feature = "ts", ts(export))]
11119pub struct ENCAPSULATED_DATA_DATA {
11120    #[doc = "sequence number (starting with 0 on every transmission)"]
11121    pub seqnr: u16,
11122    #[doc = "image data bytes"]
11123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11125    pub data: [u8; 253],
11126}
11127impl ENCAPSULATED_DATA_DATA {
11128    pub const ENCODED_LEN: usize = 255usize;
11129    pub const DEFAULT: Self = Self {
11130        seqnr: 0_u16,
11131        data: [0_u8; 253usize],
11132    };
11133    #[cfg(feature = "arbitrary")]
11134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11135        use arbitrary::{Arbitrary, Unstructured};
11136        let mut buf = [0u8; 1024];
11137        rng.fill_bytes(&mut buf);
11138        let mut unstructured = Unstructured::new(&buf);
11139        Self::arbitrary(&mut unstructured).unwrap_or_default()
11140    }
11141}
11142impl Default for ENCAPSULATED_DATA_DATA {
11143    fn default() -> Self {
11144        Self::DEFAULT.clone()
11145    }
11146}
11147impl MessageData for ENCAPSULATED_DATA_DATA {
11148    type Message = MavMessage;
11149    const ID: u32 = 131u32;
11150    const NAME: &'static str = "ENCAPSULATED_DATA";
11151    const EXTRA_CRC: u8 = 223u8;
11152    const ENCODED_LEN: usize = 255usize;
11153    fn deser(
11154        _version: MavlinkVersion,
11155        __input: &[u8],
11156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11157        let avail_len = __input.len();
11158        let mut payload_buf = [0; Self::ENCODED_LEN];
11159        let mut buf = if avail_len < Self::ENCODED_LEN {
11160            payload_buf[0..avail_len].copy_from_slice(__input);
11161            Bytes::new(&payload_buf)
11162        } else {
11163            Bytes::new(__input)
11164        };
11165        let mut __struct = Self::default();
11166        __struct.seqnr = buf.get_u16_le();
11167        for v in &mut __struct.data {
11168            let val = buf.get_u8();
11169            *v = val;
11170        }
11171        Ok(__struct)
11172    }
11173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11174        let mut __tmp = BytesMut::new(bytes);
11175        #[allow(clippy::absurd_extreme_comparisons)]
11176        #[allow(unused_comparisons)]
11177        if __tmp.remaining() < Self::ENCODED_LEN {
11178            panic!(
11179                "buffer is too small (need {} bytes, but got {})",
11180                Self::ENCODED_LEN,
11181                __tmp.remaining(),
11182            )
11183        }
11184        __tmp.put_u16_le(self.seqnr);
11185        for val in &self.data {
11186            __tmp.put_u8(*val);
11187        }
11188        if matches!(version, MavlinkVersion::V2) {
11189            let len = __tmp.len();
11190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11191        } else {
11192            __tmp.len()
11193        }
11194    }
11195}
11196#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11197#[doc = ""]
11198#[doc = "ID: 290"]
11199#[derive(Debug, Clone, PartialEq)]
11200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11202#[cfg_attr(feature = "ts", derive(TS))]
11203#[cfg_attr(feature = "ts", ts(export))]
11204pub struct ESC_INFO_DATA {
11205    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11206    pub time_usec: u64,
11207    #[doc = "Number of reported errors by each ESC since boot."]
11208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11209    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11210    pub error_count: [u32; 4],
11211    #[doc = "Counter of data packets received."]
11212    pub counter: u16,
11213    #[doc = "Bitmap of ESC failure flags."]
11214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11216    pub failure_flags: [u16; 4],
11217    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11219    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11220    pub temperature: [i16; 4],
11221    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11222    pub index: u8,
11223    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11224    pub count: u8,
11225    #[doc = "Connection type protocol for all ESC."]
11226    pub connection_type: EscConnectionType,
11227    #[doc = "Information regarding online/offline status of each ESC."]
11228    pub info: u8,
11229}
11230impl ESC_INFO_DATA {
11231    pub const ENCODED_LEN: usize = 46usize;
11232    pub const DEFAULT: Self = Self {
11233        time_usec: 0_u64,
11234        error_count: [0_u32; 4usize],
11235        counter: 0_u16,
11236        failure_flags: [0_u16; 4usize],
11237        temperature: [0_i16; 4usize],
11238        index: 0_u8,
11239        count: 0_u8,
11240        connection_type: EscConnectionType::DEFAULT,
11241        info: 0_u8,
11242    };
11243    #[cfg(feature = "arbitrary")]
11244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11245        use arbitrary::{Arbitrary, Unstructured};
11246        let mut buf = [0u8; 1024];
11247        rng.fill_bytes(&mut buf);
11248        let mut unstructured = Unstructured::new(&buf);
11249        Self::arbitrary(&mut unstructured).unwrap_or_default()
11250    }
11251}
11252impl Default for ESC_INFO_DATA {
11253    fn default() -> Self {
11254        Self::DEFAULT.clone()
11255    }
11256}
11257impl MessageData for ESC_INFO_DATA {
11258    type Message = MavMessage;
11259    const ID: u32 = 290u32;
11260    const NAME: &'static str = "ESC_INFO";
11261    const EXTRA_CRC: u8 = 251u8;
11262    const ENCODED_LEN: usize = 46usize;
11263    fn deser(
11264        _version: MavlinkVersion,
11265        __input: &[u8],
11266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11267        let avail_len = __input.len();
11268        let mut payload_buf = [0; Self::ENCODED_LEN];
11269        let mut buf = if avail_len < Self::ENCODED_LEN {
11270            payload_buf[0..avail_len].copy_from_slice(__input);
11271            Bytes::new(&payload_buf)
11272        } else {
11273            Bytes::new(__input)
11274        };
11275        let mut __struct = Self::default();
11276        __struct.time_usec = buf.get_u64_le();
11277        for v in &mut __struct.error_count {
11278            let val = buf.get_u32_le();
11279            *v = val;
11280        }
11281        __struct.counter = buf.get_u16_le();
11282        for v in &mut __struct.failure_flags {
11283            let val = buf.get_u16_le();
11284            *v = val;
11285        }
11286        for v in &mut __struct.temperature {
11287            let val = buf.get_i16_le();
11288            *v = val;
11289        }
11290        __struct.index = buf.get_u8();
11291        __struct.count = buf.get_u8();
11292        let tmp = buf.get_u8();
11293        __struct.connection_type =
11294            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11295                enum_type: "EscConnectionType",
11296                value: tmp as u32,
11297            })?;
11298        __struct.info = buf.get_u8();
11299        Ok(__struct)
11300    }
11301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11302        let mut __tmp = BytesMut::new(bytes);
11303        #[allow(clippy::absurd_extreme_comparisons)]
11304        #[allow(unused_comparisons)]
11305        if __tmp.remaining() < Self::ENCODED_LEN {
11306            panic!(
11307                "buffer is too small (need {} bytes, but got {})",
11308                Self::ENCODED_LEN,
11309                __tmp.remaining(),
11310            )
11311        }
11312        __tmp.put_u64_le(self.time_usec);
11313        for val in &self.error_count {
11314            __tmp.put_u32_le(*val);
11315        }
11316        __tmp.put_u16_le(self.counter);
11317        for val in &self.failure_flags {
11318            __tmp.put_u16_le(*val);
11319        }
11320        for val in &self.temperature {
11321            __tmp.put_i16_le(*val);
11322        }
11323        __tmp.put_u8(self.index);
11324        __tmp.put_u8(self.count);
11325        __tmp.put_u8(self.connection_type as u8);
11326        __tmp.put_u8(self.info);
11327        if matches!(version, MavlinkVersion::V2) {
11328            let len = __tmp.len();
11329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11330        } else {
11331            __tmp.len()
11332        }
11333    }
11334}
11335#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11336#[doc = ""]
11337#[doc = "ID: 291"]
11338#[derive(Debug, Clone, PartialEq)]
11339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11341#[cfg_attr(feature = "ts", derive(TS))]
11342#[cfg_attr(feature = "ts", ts(export))]
11343pub struct ESC_STATUS_DATA {
11344    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11345    pub time_usec: u64,
11346    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11349    pub rpm: [i32; 4],
11350    #[doc = "Voltage measured from each ESC."]
11351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11352    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11353    pub voltage: [f32; 4],
11354    #[doc = "Current measured from each ESC."]
11355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11357    pub current: [f32; 4],
11358    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11359    pub index: u8,
11360}
11361impl ESC_STATUS_DATA {
11362    pub const ENCODED_LEN: usize = 57usize;
11363    pub const DEFAULT: Self = Self {
11364        time_usec: 0_u64,
11365        rpm: [0_i32; 4usize],
11366        voltage: [0.0_f32; 4usize],
11367        current: [0.0_f32; 4usize],
11368        index: 0_u8,
11369    };
11370    #[cfg(feature = "arbitrary")]
11371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11372        use arbitrary::{Arbitrary, Unstructured};
11373        let mut buf = [0u8; 1024];
11374        rng.fill_bytes(&mut buf);
11375        let mut unstructured = Unstructured::new(&buf);
11376        Self::arbitrary(&mut unstructured).unwrap_or_default()
11377    }
11378}
11379impl Default for ESC_STATUS_DATA {
11380    fn default() -> Self {
11381        Self::DEFAULT.clone()
11382    }
11383}
11384impl MessageData for ESC_STATUS_DATA {
11385    type Message = MavMessage;
11386    const ID: u32 = 291u32;
11387    const NAME: &'static str = "ESC_STATUS";
11388    const EXTRA_CRC: u8 = 10u8;
11389    const ENCODED_LEN: usize = 57usize;
11390    fn deser(
11391        _version: MavlinkVersion,
11392        __input: &[u8],
11393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11394        let avail_len = __input.len();
11395        let mut payload_buf = [0; Self::ENCODED_LEN];
11396        let mut buf = if avail_len < Self::ENCODED_LEN {
11397            payload_buf[0..avail_len].copy_from_slice(__input);
11398            Bytes::new(&payload_buf)
11399        } else {
11400            Bytes::new(__input)
11401        };
11402        let mut __struct = Self::default();
11403        __struct.time_usec = buf.get_u64_le();
11404        for v in &mut __struct.rpm {
11405            let val = buf.get_i32_le();
11406            *v = val;
11407        }
11408        for v in &mut __struct.voltage {
11409            let val = buf.get_f32_le();
11410            *v = val;
11411        }
11412        for v in &mut __struct.current {
11413            let val = buf.get_f32_le();
11414            *v = val;
11415        }
11416        __struct.index = buf.get_u8();
11417        Ok(__struct)
11418    }
11419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11420        let mut __tmp = BytesMut::new(bytes);
11421        #[allow(clippy::absurd_extreme_comparisons)]
11422        #[allow(unused_comparisons)]
11423        if __tmp.remaining() < Self::ENCODED_LEN {
11424            panic!(
11425                "buffer is too small (need {} bytes, but got {})",
11426                Self::ENCODED_LEN,
11427                __tmp.remaining(),
11428            )
11429        }
11430        __tmp.put_u64_le(self.time_usec);
11431        for val in &self.rpm {
11432            __tmp.put_i32_le(*val);
11433        }
11434        for val in &self.voltage {
11435            __tmp.put_f32_le(*val);
11436        }
11437        for val in &self.current {
11438            __tmp.put_f32_le(*val);
11439        }
11440        __tmp.put_u8(self.index);
11441        if matches!(version, MavlinkVersion::V2) {
11442            let len = __tmp.len();
11443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11444        } else {
11445            __tmp.len()
11446        }
11447    }
11448}
11449#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11450#[doc = ""]
11451#[doc = "ID: 230"]
11452#[derive(Debug, Clone, PartialEq)]
11453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11455#[cfg_attr(feature = "ts", derive(TS))]
11456#[cfg_attr(feature = "ts", ts(export))]
11457pub struct ESTIMATOR_STATUS_DATA {
11458    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11459    pub time_usec: u64,
11460    #[doc = "Velocity innovation test ratio"]
11461    pub vel_ratio: f32,
11462    #[doc = "Horizontal position innovation test ratio"]
11463    pub pos_horiz_ratio: f32,
11464    #[doc = "Vertical position innovation test ratio"]
11465    pub pos_vert_ratio: f32,
11466    #[doc = "Magnetometer innovation test ratio"]
11467    pub mag_ratio: f32,
11468    #[doc = "Height above terrain innovation test ratio"]
11469    pub hagl_ratio: f32,
11470    #[doc = "True airspeed innovation test ratio"]
11471    pub tas_ratio: f32,
11472    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11473    pub pos_horiz_accuracy: f32,
11474    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11475    pub pos_vert_accuracy: f32,
11476    #[doc = "Bitmap indicating which EKF outputs are valid."]
11477    pub flags: EstimatorStatusFlags,
11478}
11479impl ESTIMATOR_STATUS_DATA {
11480    pub const ENCODED_LEN: usize = 42usize;
11481    pub const DEFAULT: Self = Self {
11482        time_usec: 0_u64,
11483        vel_ratio: 0.0_f32,
11484        pos_horiz_ratio: 0.0_f32,
11485        pos_vert_ratio: 0.0_f32,
11486        mag_ratio: 0.0_f32,
11487        hagl_ratio: 0.0_f32,
11488        tas_ratio: 0.0_f32,
11489        pos_horiz_accuracy: 0.0_f32,
11490        pos_vert_accuracy: 0.0_f32,
11491        flags: EstimatorStatusFlags::DEFAULT,
11492    };
11493    #[cfg(feature = "arbitrary")]
11494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11495        use arbitrary::{Arbitrary, Unstructured};
11496        let mut buf = [0u8; 1024];
11497        rng.fill_bytes(&mut buf);
11498        let mut unstructured = Unstructured::new(&buf);
11499        Self::arbitrary(&mut unstructured).unwrap_or_default()
11500    }
11501}
11502impl Default for ESTIMATOR_STATUS_DATA {
11503    fn default() -> Self {
11504        Self::DEFAULT.clone()
11505    }
11506}
11507impl MessageData for ESTIMATOR_STATUS_DATA {
11508    type Message = MavMessage;
11509    const ID: u32 = 230u32;
11510    const NAME: &'static str = "ESTIMATOR_STATUS";
11511    const EXTRA_CRC: u8 = 163u8;
11512    const ENCODED_LEN: usize = 42usize;
11513    fn deser(
11514        _version: MavlinkVersion,
11515        __input: &[u8],
11516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11517        let avail_len = __input.len();
11518        let mut payload_buf = [0; Self::ENCODED_LEN];
11519        let mut buf = if avail_len < Self::ENCODED_LEN {
11520            payload_buf[0..avail_len].copy_from_slice(__input);
11521            Bytes::new(&payload_buf)
11522        } else {
11523            Bytes::new(__input)
11524        };
11525        let mut __struct = Self::default();
11526        __struct.time_usec = buf.get_u64_le();
11527        __struct.vel_ratio = buf.get_f32_le();
11528        __struct.pos_horiz_ratio = buf.get_f32_le();
11529        __struct.pos_vert_ratio = buf.get_f32_le();
11530        __struct.mag_ratio = buf.get_f32_le();
11531        __struct.hagl_ratio = buf.get_f32_le();
11532        __struct.tas_ratio = buf.get_f32_le();
11533        __struct.pos_horiz_accuracy = buf.get_f32_le();
11534        __struct.pos_vert_accuracy = buf.get_f32_le();
11535        let tmp = buf.get_u16_le();
11536        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11537            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11538                flag_type: "EstimatorStatusFlags",
11539                value: tmp as u32,
11540            })?;
11541        Ok(__struct)
11542    }
11543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11544        let mut __tmp = BytesMut::new(bytes);
11545        #[allow(clippy::absurd_extreme_comparisons)]
11546        #[allow(unused_comparisons)]
11547        if __tmp.remaining() < Self::ENCODED_LEN {
11548            panic!(
11549                "buffer is too small (need {} bytes, but got {})",
11550                Self::ENCODED_LEN,
11551                __tmp.remaining(),
11552            )
11553        }
11554        __tmp.put_u64_le(self.time_usec);
11555        __tmp.put_f32_le(self.vel_ratio);
11556        __tmp.put_f32_le(self.pos_horiz_ratio);
11557        __tmp.put_f32_le(self.pos_vert_ratio);
11558        __tmp.put_f32_le(self.mag_ratio);
11559        __tmp.put_f32_le(self.hagl_ratio);
11560        __tmp.put_f32_le(self.tas_ratio);
11561        __tmp.put_f32_le(self.pos_horiz_accuracy);
11562        __tmp.put_f32_le(self.pos_vert_accuracy);
11563        __tmp.put_u16_le(self.flags.bits());
11564        if matches!(version, MavlinkVersion::V2) {
11565            let len = __tmp.len();
11566            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11567        } else {
11568            __tmp.len()
11569        }
11570    }
11571}
11572#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11573#[doc = ""]
11574#[doc = "ID: 410"]
11575#[derive(Debug, Clone, PartialEq)]
11576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11578#[cfg_attr(feature = "ts", derive(TS))]
11579#[cfg_attr(feature = "ts", ts(export))]
11580pub struct EVENT_DATA {
11581    #[doc = "Event ID (as defined in the component metadata)"]
11582    pub id: u32,
11583    #[doc = "Timestamp (time since system boot when the event happened)."]
11584    pub event_time_boot_ms: u32,
11585    #[doc = "Sequence number."]
11586    pub sequence: u16,
11587    #[doc = "Component ID"]
11588    pub destination_component: u8,
11589    #[doc = "System ID"]
11590    pub destination_system: u8,
11591    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11592    pub log_levels: u8,
11593    #[doc = "Arguments (depend on event ID)."]
11594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11595    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11596    pub arguments: [u8; 40],
11597}
11598impl EVENT_DATA {
11599    pub const ENCODED_LEN: usize = 53usize;
11600    pub const DEFAULT: Self = Self {
11601        id: 0_u32,
11602        event_time_boot_ms: 0_u32,
11603        sequence: 0_u16,
11604        destination_component: 0_u8,
11605        destination_system: 0_u8,
11606        log_levels: 0_u8,
11607        arguments: [0_u8; 40usize],
11608    };
11609    #[cfg(feature = "arbitrary")]
11610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11611        use arbitrary::{Arbitrary, Unstructured};
11612        let mut buf = [0u8; 1024];
11613        rng.fill_bytes(&mut buf);
11614        let mut unstructured = Unstructured::new(&buf);
11615        Self::arbitrary(&mut unstructured).unwrap_or_default()
11616    }
11617}
11618impl Default for EVENT_DATA {
11619    fn default() -> Self {
11620        Self::DEFAULT.clone()
11621    }
11622}
11623impl MessageData for EVENT_DATA {
11624    type Message = MavMessage;
11625    const ID: u32 = 410u32;
11626    const NAME: &'static str = "EVENT";
11627    const EXTRA_CRC: u8 = 160u8;
11628    const ENCODED_LEN: usize = 53usize;
11629    fn deser(
11630        _version: MavlinkVersion,
11631        __input: &[u8],
11632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11633        let avail_len = __input.len();
11634        let mut payload_buf = [0; Self::ENCODED_LEN];
11635        let mut buf = if avail_len < Self::ENCODED_LEN {
11636            payload_buf[0..avail_len].copy_from_slice(__input);
11637            Bytes::new(&payload_buf)
11638        } else {
11639            Bytes::new(__input)
11640        };
11641        let mut __struct = Self::default();
11642        __struct.id = buf.get_u32_le();
11643        __struct.event_time_boot_ms = buf.get_u32_le();
11644        __struct.sequence = buf.get_u16_le();
11645        __struct.destination_component = buf.get_u8();
11646        __struct.destination_system = buf.get_u8();
11647        __struct.log_levels = buf.get_u8();
11648        for v in &mut __struct.arguments {
11649            let val = buf.get_u8();
11650            *v = val;
11651        }
11652        Ok(__struct)
11653    }
11654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11655        let mut __tmp = BytesMut::new(bytes);
11656        #[allow(clippy::absurd_extreme_comparisons)]
11657        #[allow(unused_comparisons)]
11658        if __tmp.remaining() < Self::ENCODED_LEN {
11659            panic!(
11660                "buffer is too small (need {} bytes, but got {})",
11661                Self::ENCODED_LEN,
11662                __tmp.remaining(),
11663            )
11664        }
11665        __tmp.put_u32_le(self.id);
11666        __tmp.put_u32_le(self.event_time_boot_ms);
11667        __tmp.put_u16_le(self.sequence);
11668        __tmp.put_u8(self.destination_component);
11669        __tmp.put_u8(self.destination_system);
11670        __tmp.put_u8(self.log_levels);
11671        for val in &self.arguments {
11672            __tmp.put_u8(*val);
11673        }
11674        if matches!(version, MavlinkVersion::V2) {
11675            let len = __tmp.len();
11676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11677        } else {
11678            __tmp.len()
11679        }
11680    }
11681}
11682#[doc = "Provides state for additional features."]
11683#[doc = ""]
11684#[doc = "ID: 245"]
11685#[derive(Debug, Clone, PartialEq)]
11686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11688#[cfg_attr(feature = "ts", derive(TS))]
11689#[cfg_attr(feature = "ts", ts(export))]
11690pub struct EXTENDED_SYS_STATE_DATA {
11691    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11692    pub vtol_state: MavVtolState,
11693    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11694    pub landed_state: MavLandedState,
11695}
11696impl EXTENDED_SYS_STATE_DATA {
11697    pub const ENCODED_LEN: usize = 2usize;
11698    pub const DEFAULT: Self = Self {
11699        vtol_state: MavVtolState::DEFAULT,
11700        landed_state: MavLandedState::DEFAULT,
11701    };
11702    #[cfg(feature = "arbitrary")]
11703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11704        use arbitrary::{Arbitrary, Unstructured};
11705        let mut buf = [0u8; 1024];
11706        rng.fill_bytes(&mut buf);
11707        let mut unstructured = Unstructured::new(&buf);
11708        Self::arbitrary(&mut unstructured).unwrap_or_default()
11709    }
11710}
11711impl Default for EXTENDED_SYS_STATE_DATA {
11712    fn default() -> Self {
11713        Self::DEFAULT.clone()
11714    }
11715}
11716impl MessageData for EXTENDED_SYS_STATE_DATA {
11717    type Message = MavMessage;
11718    const ID: u32 = 245u32;
11719    const NAME: &'static str = "EXTENDED_SYS_STATE";
11720    const EXTRA_CRC: u8 = 130u8;
11721    const ENCODED_LEN: usize = 2usize;
11722    fn deser(
11723        _version: MavlinkVersion,
11724        __input: &[u8],
11725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11726        let avail_len = __input.len();
11727        let mut payload_buf = [0; Self::ENCODED_LEN];
11728        let mut buf = if avail_len < Self::ENCODED_LEN {
11729            payload_buf[0..avail_len].copy_from_slice(__input);
11730            Bytes::new(&payload_buf)
11731        } else {
11732            Bytes::new(__input)
11733        };
11734        let mut __struct = Self::default();
11735        let tmp = buf.get_u8();
11736        __struct.vtol_state =
11737            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11738                enum_type: "MavVtolState",
11739                value: tmp as u32,
11740            })?;
11741        let tmp = buf.get_u8();
11742        __struct.landed_state =
11743            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11744                enum_type: "MavLandedState",
11745                value: tmp as u32,
11746            })?;
11747        Ok(__struct)
11748    }
11749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11750        let mut __tmp = BytesMut::new(bytes);
11751        #[allow(clippy::absurd_extreme_comparisons)]
11752        #[allow(unused_comparisons)]
11753        if __tmp.remaining() < Self::ENCODED_LEN {
11754            panic!(
11755                "buffer is too small (need {} bytes, but got {})",
11756                Self::ENCODED_LEN,
11757                __tmp.remaining(),
11758            )
11759        }
11760        __tmp.put_u8(self.vtol_state as u8);
11761        __tmp.put_u8(self.landed_state as u8);
11762        if matches!(version, MavlinkVersion::V2) {
11763            let len = __tmp.len();
11764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11765        } else {
11766            __tmp.len()
11767        }
11768    }
11769}
11770#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11771#[doc = ""]
11772#[doc = "ID: 162"]
11773#[derive(Debug, Clone, PartialEq)]
11774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11776#[cfg_attr(feature = "ts", derive(TS))]
11777#[cfg_attr(feature = "ts", ts(export))]
11778pub struct FENCE_STATUS_DATA {
11779    #[doc = "Time (since boot) of last breach."]
11780    pub breach_time: u32,
11781    #[doc = "Number of fence breaches."]
11782    pub breach_count: u16,
11783    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11784    pub breach_status: u8,
11785    #[doc = "Last breach type."]
11786    pub breach_type: FenceBreach,
11787    #[doc = "Active action to prevent fence breach"]
11788    #[cfg_attr(feature = "serde", serde(default))]
11789    pub breach_mitigation: FenceMitigate,
11790}
11791impl FENCE_STATUS_DATA {
11792    pub const ENCODED_LEN: usize = 9usize;
11793    pub const DEFAULT: Self = Self {
11794        breach_time: 0_u32,
11795        breach_count: 0_u16,
11796        breach_status: 0_u8,
11797        breach_type: FenceBreach::DEFAULT,
11798        breach_mitigation: FenceMitigate::DEFAULT,
11799    };
11800    #[cfg(feature = "arbitrary")]
11801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11802        use arbitrary::{Arbitrary, Unstructured};
11803        let mut buf = [0u8; 1024];
11804        rng.fill_bytes(&mut buf);
11805        let mut unstructured = Unstructured::new(&buf);
11806        Self::arbitrary(&mut unstructured).unwrap_or_default()
11807    }
11808}
11809impl Default for FENCE_STATUS_DATA {
11810    fn default() -> Self {
11811        Self::DEFAULT.clone()
11812    }
11813}
11814impl MessageData for FENCE_STATUS_DATA {
11815    type Message = MavMessage;
11816    const ID: u32 = 162u32;
11817    const NAME: &'static str = "FENCE_STATUS";
11818    const EXTRA_CRC: u8 = 189u8;
11819    const ENCODED_LEN: usize = 9usize;
11820    fn deser(
11821        _version: MavlinkVersion,
11822        __input: &[u8],
11823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11824        let avail_len = __input.len();
11825        let mut payload_buf = [0; Self::ENCODED_LEN];
11826        let mut buf = if avail_len < Self::ENCODED_LEN {
11827            payload_buf[0..avail_len].copy_from_slice(__input);
11828            Bytes::new(&payload_buf)
11829        } else {
11830            Bytes::new(__input)
11831        };
11832        let mut __struct = Self::default();
11833        __struct.breach_time = buf.get_u32_le();
11834        __struct.breach_count = buf.get_u16_le();
11835        __struct.breach_status = buf.get_u8();
11836        let tmp = buf.get_u8();
11837        __struct.breach_type =
11838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11839                enum_type: "FenceBreach",
11840                value: tmp as u32,
11841            })?;
11842        let tmp = buf.get_u8();
11843        __struct.breach_mitigation =
11844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11845                enum_type: "FenceMitigate",
11846                value: tmp as u32,
11847            })?;
11848        Ok(__struct)
11849    }
11850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11851        let mut __tmp = BytesMut::new(bytes);
11852        #[allow(clippy::absurd_extreme_comparisons)]
11853        #[allow(unused_comparisons)]
11854        if __tmp.remaining() < Self::ENCODED_LEN {
11855            panic!(
11856                "buffer is too small (need {} bytes, but got {})",
11857                Self::ENCODED_LEN,
11858                __tmp.remaining(),
11859            )
11860        }
11861        __tmp.put_u32_le(self.breach_time);
11862        __tmp.put_u16_le(self.breach_count);
11863        __tmp.put_u8(self.breach_status);
11864        __tmp.put_u8(self.breach_type as u8);
11865        if matches!(version, MavlinkVersion::V2) {
11866            __tmp.put_u8(self.breach_mitigation as u8);
11867            let len = __tmp.len();
11868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11869        } else {
11870            __tmp.len()
11871        }
11872    }
11873}
11874#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11875#[doc = ""]
11876#[doc = "ID: 110"]
11877#[derive(Debug, Clone, PartialEq)]
11878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11880#[cfg_attr(feature = "ts", derive(TS))]
11881#[cfg_attr(feature = "ts", ts(export))]
11882pub struct FILE_TRANSFER_PROTOCOL_DATA {
11883    #[doc = "Network ID (0 for broadcast)"]
11884    pub target_network: u8,
11885    #[doc = "System ID (0 for broadcast)"]
11886    pub target_system: u8,
11887    #[doc = "Component ID (0 for broadcast)"]
11888    pub target_component: u8,
11889    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11891    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11892    pub payload: [u8; 251],
11893}
11894impl FILE_TRANSFER_PROTOCOL_DATA {
11895    pub const ENCODED_LEN: usize = 254usize;
11896    pub const DEFAULT: Self = Self {
11897        target_network: 0_u8,
11898        target_system: 0_u8,
11899        target_component: 0_u8,
11900        payload: [0_u8; 251usize],
11901    };
11902    #[cfg(feature = "arbitrary")]
11903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11904        use arbitrary::{Arbitrary, Unstructured};
11905        let mut buf = [0u8; 1024];
11906        rng.fill_bytes(&mut buf);
11907        let mut unstructured = Unstructured::new(&buf);
11908        Self::arbitrary(&mut unstructured).unwrap_or_default()
11909    }
11910}
11911impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11912    fn default() -> Self {
11913        Self::DEFAULT.clone()
11914    }
11915}
11916impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11917    type Message = MavMessage;
11918    const ID: u32 = 110u32;
11919    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11920    const EXTRA_CRC: u8 = 84u8;
11921    const ENCODED_LEN: usize = 254usize;
11922    fn deser(
11923        _version: MavlinkVersion,
11924        __input: &[u8],
11925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11926        let avail_len = __input.len();
11927        let mut payload_buf = [0; Self::ENCODED_LEN];
11928        let mut buf = if avail_len < Self::ENCODED_LEN {
11929            payload_buf[0..avail_len].copy_from_slice(__input);
11930            Bytes::new(&payload_buf)
11931        } else {
11932            Bytes::new(__input)
11933        };
11934        let mut __struct = Self::default();
11935        __struct.target_network = buf.get_u8();
11936        __struct.target_system = buf.get_u8();
11937        __struct.target_component = buf.get_u8();
11938        for v in &mut __struct.payload {
11939            let val = buf.get_u8();
11940            *v = val;
11941        }
11942        Ok(__struct)
11943    }
11944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11945        let mut __tmp = BytesMut::new(bytes);
11946        #[allow(clippy::absurd_extreme_comparisons)]
11947        #[allow(unused_comparisons)]
11948        if __tmp.remaining() < Self::ENCODED_LEN {
11949            panic!(
11950                "buffer is too small (need {} bytes, but got {})",
11951                Self::ENCODED_LEN,
11952                __tmp.remaining(),
11953            )
11954        }
11955        __tmp.put_u8(self.target_network);
11956        __tmp.put_u8(self.target_system);
11957        __tmp.put_u8(self.target_component);
11958        for val in &self.payload {
11959            __tmp.put_u8(*val);
11960        }
11961        if matches!(version, MavlinkVersion::V2) {
11962            let len = __tmp.len();
11963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11964        } else {
11965            __tmp.len()
11966        }
11967    }
11968}
11969#[doc = "Flexifunction type and parameters for component at function index from buffer."]
11970#[doc = ""]
11971#[doc = "ID: 152"]
11972#[derive(Debug, Clone, PartialEq)]
11973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11975#[cfg_attr(feature = "ts", derive(TS))]
11976#[cfg_attr(feature = "ts", ts(export))]
11977pub struct FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11978    #[doc = "Function index"]
11979    pub func_index: u16,
11980    #[doc = "Total count of functions"]
11981    pub func_count: u16,
11982    #[doc = "Address in the flexifunction data, Set to 0xFFFF to use address in target memory"]
11983    pub data_address: u16,
11984    #[doc = "Size of the"]
11985    pub data_size: u16,
11986    #[doc = "System ID"]
11987    pub target_system: u8,
11988    #[doc = "Component ID"]
11989    pub target_component: u8,
11990    #[doc = "Settings data"]
11991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11992    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11993    pub data: [i8; 48],
11994}
11995impl FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11996    pub const ENCODED_LEN: usize = 58usize;
11997    pub const DEFAULT: Self = Self {
11998        func_index: 0_u16,
11999        func_count: 0_u16,
12000        data_address: 0_u16,
12001        data_size: 0_u16,
12002        target_system: 0_u8,
12003        target_component: 0_u8,
12004        data: [0_i8; 48usize],
12005    };
12006    #[cfg(feature = "arbitrary")]
12007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12008        use arbitrary::{Arbitrary, Unstructured};
12009        let mut buf = [0u8; 1024];
12010        rng.fill_bytes(&mut buf);
12011        let mut unstructured = Unstructured::new(&buf);
12012        Self::arbitrary(&mut unstructured).unwrap_or_default()
12013    }
12014}
12015impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
12016    fn default() -> Self {
12017        Self::DEFAULT.clone()
12018    }
12019}
12020impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
12021    type Message = MavMessage;
12022    const ID: u32 = 152u32;
12023    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION";
12024    const EXTRA_CRC: u8 = 101u8;
12025    const ENCODED_LEN: usize = 58usize;
12026    fn deser(
12027        _version: MavlinkVersion,
12028        __input: &[u8],
12029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12030        let avail_len = __input.len();
12031        let mut payload_buf = [0; Self::ENCODED_LEN];
12032        let mut buf = if avail_len < Self::ENCODED_LEN {
12033            payload_buf[0..avail_len].copy_from_slice(__input);
12034            Bytes::new(&payload_buf)
12035        } else {
12036            Bytes::new(__input)
12037        };
12038        let mut __struct = Self::default();
12039        __struct.func_index = buf.get_u16_le();
12040        __struct.func_count = buf.get_u16_le();
12041        __struct.data_address = buf.get_u16_le();
12042        __struct.data_size = buf.get_u16_le();
12043        __struct.target_system = buf.get_u8();
12044        __struct.target_component = buf.get_u8();
12045        for v in &mut __struct.data {
12046            let val = buf.get_i8();
12047            *v = val;
12048        }
12049        Ok(__struct)
12050    }
12051    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12052        let mut __tmp = BytesMut::new(bytes);
12053        #[allow(clippy::absurd_extreme_comparisons)]
12054        #[allow(unused_comparisons)]
12055        if __tmp.remaining() < Self::ENCODED_LEN {
12056            panic!(
12057                "buffer is too small (need {} bytes, but got {})",
12058                Self::ENCODED_LEN,
12059                __tmp.remaining(),
12060            )
12061        }
12062        __tmp.put_u16_le(self.func_index);
12063        __tmp.put_u16_le(self.func_count);
12064        __tmp.put_u16_le(self.data_address);
12065        __tmp.put_u16_le(self.data_size);
12066        __tmp.put_u8(self.target_system);
12067        __tmp.put_u8(self.target_component);
12068        for val in &self.data {
12069            __tmp.put_i8(*val);
12070        }
12071        if matches!(version, MavlinkVersion::V2) {
12072            let len = __tmp.len();
12073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12074        } else {
12075            __tmp.len()
12076        }
12077    }
12078}
12079#[doc = "Flexifunction type and parameters for component at function index from buffer."]
12080#[doc = ""]
12081#[doc = "ID: 153"]
12082#[derive(Debug, Clone, PartialEq)]
12083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12085#[cfg_attr(feature = "ts", derive(TS))]
12086#[cfg_attr(feature = "ts", ts(export))]
12087pub struct FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
12088    #[doc = "Function index"]
12089    pub func_index: u16,
12090    #[doc = "result of acknowledge, 0=fail, 1=good"]
12091    pub result: u16,
12092    #[doc = "System ID"]
12093    pub target_system: u8,
12094    #[doc = "Component ID"]
12095    pub target_component: u8,
12096}
12097impl FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
12098    pub const ENCODED_LEN: usize = 6usize;
12099    pub const DEFAULT: Self = Self {
12100        func_index: 0_u16,
12101        result: 0_u16,
12102        target_system: 0_u8,
12103        target_component: 0_u8,
12104    };
12105    #[cfg(feature = "arbitrary")]
12106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12107        use arbitrary::{Arbitrary, Unstructured};
12108        let mut buf = [0u8; 1024];
12109        rng.fill_bytes(&mut buf);
12110        let mut unstructured = Unstructured::new(&buf);
12111        Self::arbitrary(&mut unstructured).unwrap_or_default()
12112    }
12113}
12114impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
12115    fn default() -> Self {
12116        Self::DEFAULT.clone()
12117    }
12118}
12119impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
12120    type Message = MavMessage;
12121    const ID: u32 = 153u32;
12122    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION_ACK";
12123    const EXTRA_CRC: u8 = 109u8;
12124    const ENCODED_LEN: usize = 6usize;
12125    fn deser(
12126        _version: MavlinkVersion,
12127        __input: &[u8],
12128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12129        let avail_len = __input.len();
12130        let mut payload_buf = [0; Self::ENCODED_LEN];
12131        let mut buf = if avail_len < Self::ENCODED_LEN {
12132            payload_buf[0..avail_len].copy_from_slice(__input);
12133            Bytes::new(&payload_buf)
12134        } else {
12135            Bytes::new(__input)
12136        };
12137        let mut __struct = Self::default();
12138        __struct.func_index = buf.get_u16_le();
12139        __struct.result = buf.get_u16_le();
12140        __struct.target_system = buf.get_u8();
12141        __struct.target_component = buf.get_u8();
12142        Ok(__struct)
12143    }
12144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12145        let mut __tmp = BytesMut::new(bytes);
12146        #[allow(clippy::absurd_extreme_comparisons)]
12147        #[allow(unused_comparisons)]
12148        if __tmp.remaining() < Self::ENCODED_LEN {
12149            panic!(
12150                "buffer is too small (need {} bytes, but got {})",
12151                Self::ENCODED_LEN,
12152                __tmp.remaining(),
12153            )
12154        }
12155        __tmp.put_u16_le(self.func_index);
12156        __tmp.put_u16_le(self.result);
12157        __tmp.put_u8(self.target_system);
12158        __tmp.put_u8(self.target_component);
12159        if matches!(version, MavlinkVersion::V2) {
12160            let len = __tmp.len();
12161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12162        } else {
12163            __tmp.len()
12164        }
12165    }
12166}
12167#[doc = "Acknowldge success or failure of a flexifunction command."]
12168#[doc = ""]
12169#[doc = "ID: 157"]
12170#[derive(Debug, Clone, PartialEq)]
12171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12173#[cfg_attr(feature = "ts", derive(TS))]
12174#[cfg_attr(feature = "ts", ts(export))]
12175pub struct FLEXIFUNCTION_COMMAND_DATA {
12176    #[doc = "System ID"]
12177    pub target_system: u8,
12178    #[doc = "Component ID"]
12179    pub target_component: u8,
12180    #[doc = "Flexifunction command type"]
12181    pub command_type: u8,
12182}
12183impl FLEXIFUNCTION_COMMAND_DATA {
12184    pub const ENCODED_LEN: usize = 3usize;
12185    pub const DEFAULT: Self = Self {
12186        target_system: 0_u8,
12187        target_component: 0_u8,
12188        command_type: 0_u8,
12189    };
12190    #[cfg(feature = "arbitrary")]
12191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12192        use arbitrary::{Arbitrary, Unstructured};
12193        let mut buf = [0u8; 1024];
12194        rng.fill_bytes(&mut buf);
12195        let mut unstructured = Unstructured::new(&buf);
12196        Self::arbitrary(&mut unstructured).unwrap_or_default()
12197    }
12198}
12199impl Default for FLEXIFUNCTION_COMMAND_DATA {
12200    fn default() -> Self {
12201        Self::DEFAULT.clone()
12202    }
12203}
12204impl MessageData for FLEXIFUNCTION_COMMAND_DATA {
12205    type Message = MavMessage;
12206    const ID: u32 = 157u32;
12207    const NAME: &'static str = "FLEXIFUNCTION_COMMAND";
12208    const EXTRA_CRC: u8 = 133u8;
12209    const ENCODED_LEN: usize = 3usize;
12210    fn deser(
12211        _version: MavlinkVersion,
12212        __input: &[u8],
12213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12214        let avail_len = __input.len();
12215        let mut payload_buf = [0; Self::ENCODED_LEN];
12216        let mut buf = if avail_len < Self::ENCODED_LEN {
12217            payload_buf[0..avail_len].copy_from_slice(__input);
12218            Bytes::new(&payload_buf)
12219        } else {
12220            Bytes::new(__input)
12221        };
12222        let mut __struct = Self::default();
12223        __struct.target_system = buf.get_u8();
12224        __struct.target_component = buf.get_u8();
12225        __struct.command_type = buf.get_u8();
12226        Ok(__struct)
12227    }
12228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12229        let mut __tmp = BytesMut::new(bytes);
12230        #[allow(clippy::absurd_extreme_comparisons)]
12231        #[allow(unused_comparisons)]
12232        if __tmp.remaining() < Self::ENCODED_LEN {
12233            panic!(
12234                "buffer is too small (need {} bytes, but got {})",
12235                Self::ENCODED_LEN,
12236                __tmp.remaining(),
12237            )
12238        }
12239        __tmp.put_u8(self.target_system);
12240        __tmp.put_u8(self.target_component);
12241        __tmp.put_u8(self.command_type);
12242        if matches!(version, MavlinkVersion::V2) {
12243            let len = __tmp.len();
12244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12245        } else {
12246            __tmp.len()
12247        }
12248    }
12249}
12250#[doc = "Acknowldge success or failure of a flexifunction command."]
12251#[doc = ""]
12252#[doc = "ID: 158"]
12253#[derive(Debug, Clone, PartialEq)]
12254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12256#[cfg_attr(feature = "ts", derive(TS))]
12257#[cfg_attr(feature = "ts", ts(export))]
12258pub struct FLEXIFUNCTION_COMMAND_ACK_DATA {
12259    #[doc = "Command acknowledged"]
12260    pub command_type: u16,
12261    #[doc = "result of acknowledge"]
12262    pub result: u16,
12263}
12264impl FLEXIFUNCTION_COMMAND_ACK_DATA {
12265    pub const ENCODED_LEN: usize = 4usize;
12266    pub const DEFAULT: Self = Self {
12267        command_type: 0_u16,
12268        result: 0_u16,
12269    };
12270    #[cfg(feature = "arbitrary")]
12271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12272        use arbitrary::{Arbitrary, Unstructured};
12273        let mut buf = [0u8; 1024];
12274        rng.fill_bytes(&mut buf);
12275        let mut unstructured = Unstructured::new(&buf);
12276        Self::arbitrary(&mut unstructured).unwrap_or_default()
12277    }
12278}
12279impl Default for FLEXIFUNCTION_COMMAND_ACK_DATA {
12280    fn default() -> Self {
12281        Self::DEFAULT.clone()
12282    }
12283}
12284impl MessageData for FLEXIFUNCTION_COMMAND_ACK_DATA {
12285    type Message = MavMessage;
12286    const ID: u32 = 158u32;
12287    const NAME: &'static str = "FLEXIFUNCTION_COMMAND_ACK";
12288    const EXTRA_CRC: u8 = 208u8;
12289    const ENCODED_LEN: usize = 4usize;
12290    fn deser(
12291        _version: MavlinkVersion,
12292        __input: &[u8],
12293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12294        let avail_len = __input.len();
12295        let mut payload_buf = [0; Self::ENCODED_LEN];
12296        let mut buf = if avail_len < Self::ENCODED_LEN {
12297            payload_buf[0..avail_len].copy_from_slice(__input);
12298            Bytes::new(&payload_buf)
12299        } else {
12300            Bytes::new(__input)
12301        };
12302        let mut __struct = Self::default();
12303        __struct.command_type = buf.get_u16_le();
12304        __struct.result = buf.get_u16_le();
12305        Ok(__struct)
12306    }
12307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12308        let mut __tmp = BytesMut::new(bytes);
12309        #[allow(clippy::absurd_extreme_comparisons)]
12310        #[allow(unused_comparisons)]
12311        if __tmp.remaining() < Self::ENCODED_LEN {
12312            panic!(
12313                "buffer is too small (need {} bytes, but got {})",
12314                Self::ENCODED_LEN,
12315                __tmp.remaining(),
12316            )
12317        }
12318        __tmp.put_u16_le(self.command_type);
12319        __tmp.put_u16_le(self.result);
12320        if matches!(version, MavlinkVersion::V2) {
12321            let len = __tmp.len();
12322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12323        } else {
12324            __tmp.len()
12325        }
12326    }
12327}
12328#[doc = "Acknowldge success or failure of a flexifunction command."]
12329#[doc = ""]
12330#[doc = "ID: 155"]
12331#[derive(Debug, Clone, PartialEq)]
12332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12334#[cfg_attr(feature = "ts", derive(TS))]
12335#[cfg_attr(feature = "ts", ts(export))]
12336pub struct FLEXIFUNCTION_DIRECTORY_DATA {
12337    #[doc = "System ID"]
12338    pub target_system: u8,
12339    #[doc = "Component ID"]
12340    pub target_component: u8,
12341    #[doc = "0=inputs, 1=outputs"]
12342    pub directory_type: u8,
12343    #[doc = "index of first directory entry to write"]
12344    pub start_index: u8,
12345    #[doc = "count of directory entries to write"]
12346    pub count: u8,
12347    #[doc = "Settings data"]
12348    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12349    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12350    pub directory_data: [i8; 48],
12351}
12352impl FLEXIFUNCTION_DIRECTORY_DATA {
12353    pub const ENCODED_LEN: usize = 53usize;
12354    pub const DEFAULT: Self = Self {
12355        target_system: 0_u8,
12356        target_component: 0_u8,
12357        directory_type: 0_u8,
12358        start_index: 0_u8,
12359        count: 0_u8,
12360        directory_data: [0_i8; 48usize],
12361    };
12362    #[cfg(feature = "arbitrary")]
12363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12364        use arbitrary::{Arbitrary, Unstructured};
12365        let mut buf = [0u8; 1024];
12366        rng.fill_bytes(&mut buf);
12367        let mut unstructured = Unstructured::new(&buf);
12368        Self::arbitrary(&mut unstructured).unwrap_or_default()
12369    }
12370}
12371impl Default for FLEXIFUNCTION_DIRECTORY_DATA {
12372    fn default() -> Self {
12373        Self::DEFAULT.clone()
12374    }
12375}
12376impl MessageData for FLEXIFUNCTION_DIRECTORY_DATA {
12377    type Message = MavMessage;
12378    const ID: u32 = 155u32;
12379    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY";
12380    const EXTRA_CRC: u8 = 12u8;
12381    const ENCODED_LEN: usize = 53usize;
12382    fn deser(
12383        _version: MavlinkVersion,
12384        __input: &[u8],
12385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12386        let avail_len = __input.len();
12387        let mut payload_buf = [0; Self::ENCODED_LEN];
12388        let mut buf = if avail_len < Self::ENCODED_LEN {
12389            payload_buf[0..avail_len].copy_from_slice(__input);
12390            Bytes::new(&payload_buf)
12391        } else {
12392            Bytes::new(__input)
12393        };
12394        let mut __struct = Self::default();
12395        __struct.target_system = buf.get_u8();
12396        __struct.target_component = buf.get_u8();
12397        __struct.directory_type = buf.get_u8();
12398        __struct.start_index = buf.get_u8();
12399        __struct.count = buf.get_u8();
12400        for v in &mut __struct.directory_data {
12401            let val = buf.get_i8();
12402            *v = val;
12403        }
12404        Ok(__struct)
12405    }
12406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12407        let mut __tmp = BytesMut::new(bytes);
12408        #[allow(clippy::absurd_extreme_comparisons)]
12409        #[allow(unused_comparisons)]
12410        if __tmp.remaining() < Self::ENCODED_LEN {
12411            panic!(
12412                "buffer is too small (need {} bytes, but got {})",
12413                Self::ENCODED_LEN,
12414                __tmp.remaining(),
12415            )
12416        }
12417        __tmp.put_u8(self.target_system);
12418        __tmp.put_u8(self.target_component);
12419        __tmp.put_u8(self.directory_type);
12420        __tmp.put_u8(self.start_index);
12421        __tmp.put_u8(self.count);
12422        for val in &self.directory_data {
12423            __tmp.put_i8(*val);
12424        }
12425        if matches!(version, MavlinkVersion::V2) {
12426            let len = __tmp.len();
12427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12428        } else {
12429            __tmp.len()
12430        }
12431    }
12432}
12433#[doc = "Acknowldge success or failure of a flexifunction command."]
12434#[doc = ""]
12435#[doc = "ID: 156"]
12436#[derive(Debug, Clone, PartialEq)]
12437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12439#[cfg_attr(feature = "ts", derive(TS))]
12440#[cfg_attr(feature = "ts", ts(export))]
12441pub struct FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12442    #[doc = "result of acknowledge, 0=fail, 1=good"]
12443    pub result: u16,
12444    #[doc = "System ID"]
12445    pub target_system: u8,
12446    #[doc = "Component ID"]
12447    pub target_component: u8,
12448    #[doc = "0=inputs, 1=outputs"]
12449    pub directory_type: u8,
12450    #[doc = "index of first directory entry to write"]
12451    pub start_index: u8,
12452    #[doc = "count of directory entries to write"]
12453    pub count: u8,
12454}
12455impl FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12456    pub const ENCODED_LEN: usize = 7usize;
12457    pub const DEFAULT: Self = Self {
12458        result: 0_u16,
12459        target_system: 0_u8,
12460        target_component: 0_u8,
12461        directory_type: 0_u8,
12462        start_index: 0_u8,
12463        count: 0_u8,
12464    };
12465    #[cfg(feature = "arbitrary")]
12466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12467        use arbitrary::{Arbitrary, Unstructured};
12468        let mut buf = [0u8; 1024];
12469        rng.fill_bytes(&mut buf);
12470        let mut unstructured = Unstructured::new(&buf);
12471        Self::arbitrary(&mut unstructured).unwrap_or_default()
12472    }
12473}
12474impl Default for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12475    fn default() -> Self {
12476        Self::DEFAULT.clone()
12477    }
12478}
12479impl MessageData for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12480    type Message = MavMessage;
12481    const ID: u32 = 156u32;
12482    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY_ACK";
12483    const EXTRA_CRC: u8 = 218u8;
12484    const ENCODED_LEN: usize = 7usize;
12485    fn deser(
12486        _version: MavlinkVersion,
12487        __input: &[u8],
12488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12489        let avail_len = __input.len();
12490        let mut payload_buf = [0; Self::ENCODED_LEN];
12491        let mut buf = if avail_len < Self::ENCODED_LEN {
12492            payload_buf[0..avail_len].copy_from_slice(__input);
12493            Bytes::new(&payload_buf)
12494        } else {
12495            Bytes::new(__input)
12496        };
12497        let mut __struct = Self::default();
12498        __struct.result = buf.get_u16_le();
12499        __struct.target_system = buf.get_u8();
12500        __struct.target_component = buf.get_u8();
12501        __struct.directory_type = buf.get_u8();
12502        __struct.start_index = buf.get_u8();
12503        __struct.count = buf.get_u8();
12504        Ok(__struct)
12505    }
12506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12507        let mut __tmp = BytesMut::new(bytes);
12508        #[allow(clippy::absurd_extreme_comparisons)]
12509        #[allow(unused_comparisons)]
12510        if __tmp.remaining() < Self::ENCODED_LEN {
12511            panic!(
12512                "buffer is too small (need {} bytes, but got {})",
12513                Self::ENCODED_LEN,
12514                __tmp.remaining(),
12515            )
12516        }
12517        __tmp.put_u16_le(self.result);
12518        __tmp.put_u8(self.target_system);
12519        __tmp.put_u8(self.target_component);
12520        __tmp.put_u8(self.directory_type);
12521        __tmp.put_u8(self.start_index);
12522        __tmp.put_u8(self.count);
12523        if matches!(version, MavlinkVersion::V2) {
12524            let len = __tmp.len();
12525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12526        } else {
12527            __tmp.len()
12528        }
12529    }
12530}
12531#[doc = "Request reading of flexifunction data."]
12532#[doc = ""]
12533#[doc = "ID: 151"]
12534#[derive(Debug, Clone, PartialEq)]
12535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12537#[cfg_attr(feature = "ts", derive(TS))]
12538#[cfg_attr(feature = "ts", ts(export))]
12539pub struct FLEXIFUNCTION_READ_REQ_DATA {
12540    #[doc = "Type of flexifunction data requested"]
12541    pub read_req_type: i16,
12542    #[doc = "index into data where needed"]
12543    pub data_index: i16,
12544    #[doc = "System ID"]
12545    pub target_system: u8,
12546    #[doc = "Component ID"]
12547    pub target_component: u8,
12548}
12549impl FLEXIFUNCTION_READ_REQ_DATA {
12550    pub const ENCODED_LEN: usize = 6usize;
12551    pub const DEFAULT: Self = Self {
12552        read_req_type: 0_i16,
12553        data_index: 0_i16,
12554        target_system: 0_u8,
12555        target_component: 0_u8,
12556    };
12557    #[cfg(feature = "arbitrary")]
12558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12559        use arbitrary::{Arbitrary, Unstructured};
12560        let mut buf = [0u8; 1024];
12561        rng.fill_bytes(&mut buf);
12562        let mut unstructured = Unstructured::new(&buf);
12563        Self::arbitrary(&mut unstructured).unwrap_or_default()
12564    }
12565}
12566impl Default for FLEXIFUNCTION_READ_REQ_DATA {
12567    fn default() -> Self {
12568        Self::DEFAULT.clone()
12569    }
12570}
12571impl MessageData for FLEXIFUNCTION_READ_REQ_DATA {
12572    type Message = MavMessage;
12573    const ID: u32 = 151u32;
12574    const NAME: &'static str = "FLEXIFUNCTION_READ_REQ";
12575    const EXTRA_CRC: u8 = 26u8;
12576    const ENCODED_LEN: usize = 6usize;
12577    fn deser(
12578        _version: MavlinkVersion,
12579        __input: &[u8],
12580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12581        let avail_len = __input.len();
12582        let mut payload_buf = [0; Self::ENCODED_LEN];
12583        let mut buf = if avail_len < Self::ENCODED_LEN {
12584            payload_buf[0..avail_len].copy_from_slice(__input);
12585            Bytes::new(&payload_buf)
12586        } else {
12587            Bytes::new(__input)
12588        };
12589        let mut __struct = Self::default();
12590        __struct.read_req_type = buf.get_i16_le();
12591        __struct.data_index = buf.get_i16_le();
12592        __struct.target_system = buf.get_u8();
12593        __struct.target_component = buf.get_u8();
12594        Ok(__struct)
12595    }
12596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12597        let mut __tmp = BytesMut::new(bytes);
12598        #[allow(clippy::absurd_extreme_comparisons)]
12599        #[allow(unused_comparisons)]
12600        if __tmp.remaining() < Self::ENCODED_LEN {
12601            panic!(
12602                "buffer is too small (need {} bytes, but got {})",
12603                Self::ENCODED_LEN,
12604                __tmp.remaining(),
12605            )
12606        }
12607        __tmp.put_i16_le(self.read_req_type);
12608        __tmp.put_i16_le(self.data_index);
12609        __tmp.put_u8(self.target_system);
12610        __tmp.put_u8(self.target_component);
12611        if matches!(version, MavlinkVersion::V2) {
12612            let len = __tmp.len();
12613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12614        } else {
12615            __tmp.len()
12616        }
12617    }
12618}
12619#[doc = "Depreciated but used as a compiler flag.  Do not remove."]
12620#[doc = ""]
12621#[doc = "ID: 150"]
12622#[derive(Debug, Clone, PartialEq)]
12623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12625#[cfg_attr(feature = "ts", derive(TS))]
12626#[cfg_attr(feature = "ts", ts(export))]
12627pub struct FLEXIFUNCTION_SET_DATA {
12628    #[doc = "System ID"]
12629    pub target_system: u8,
12630    #[doc = "Component ID"]
12631    pub target_component: u8,
12632}
12633impl FLEXIFUNCTION_SET_DATA {
12634    pub const ENCODED_LEN: usize = 2usize;
12635    pub const DEFAULT: Self = Self {
12636        target_system: 0_u8,
12637        target_component: 0_u8,
12638    };
12639    #[cfg(feature = "arbitrary")]
12640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12641        use arbitrary::{Arbitrary, Unstructured};
12642        let mut buf = [0u8; 1024];
12643        rng.fill_bytes(&mut buf);
12644        let mut unstructured = Unstructured::new(&buf);
12645        Self::arbitrary(&mut unstructured).unwrap_or_default()
12646    }
12647}
12648impl Default for FLEXIFUNCTION_SET_DATA {
12649    fn default() -> Self {
12650        Self::DEFAULT.clone()
12651    }
12652}
12653impl MessageData for FLEXIFUNCTION_SET_DATA {
12654    type Message = MavMessage;
12655    const ID: u32 = 150u32;
12656    const NAME: &'static str = "FLEXIFUNCTION_SET";
12657    const EXTRA_CRC: u8 = 181u8;
12658    const ENCODED_LEN: usize = 2usize;
12659    fn deser(
12660        _version: MavlinkVersion,
12661        __input: &[u8],
12662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12663        let avail_len = __input.len();
12664        let mut payload_buf = [0; Self::ENCODED_LEN];
12665        let mut buf = if avail_len < Self::ENCODED_LEN {
12666            payload_buf[0..avail_len].copy_from_slice(__input);
12667            Bytes::new(&payload_buf)
12668        } else {
12669            Bytes::new(__input)
12670        };
12671        let mut __struct = Self::default();
12672        __struct.target_system = buf.get_u8();
12673        __struct.target_component = buf.get_u8();
12674        Ok(__struct)
12675    }
12676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12677        let mut __tmp = BytesMut::new(bytes);
12678        #[allow(clippy::absurd_extreme_comparisons)]
12679        #[allow(unused_comparisons)]
12680        if __tmp.remaining() < Self::ENCODED_LEN {
12681            panic!(
12682                "buffer is too small (need {} bytes, but got {})",
12683                Self::ENCODED_LEN,
12684                __tmp.remaining(),
12685            )
12686        }
12687        __tmp.put_u8(self.target_system);
12688        __tmp.put_u8(self.target_component);
12689        if matches!(version, MavlinkVersion::V2) {
12690            let len = __tmp.len();
12691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12692        } else {
12693            __tmp.len()
12694        }
12695    }
12696}
12697#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12698#[doc = ""]
12699#[doc = "ID: 264"]
12700#[derive(Debug, Clone, PartialEq)]
12701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12703#[cfg_attr(feature = "ts", derive(TS))]
12704#[cfg_attr(feature = "ts", ts(export))]
12705pub struct FLIGHT_INFORMATION_DATA {
12706    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12707    pub arming_time_utc: u64,
12708    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12709    pub takeoff_time_utc: u64,
12710    #[doc = "Flight number. Note, field is misnamed UUID."]
12711    pub flight_uuid: u64,
12712    #[doc = "Timestamp (time since system boot)."]
12713    pub time_boot_ms: u32,
12714    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12716    pub landing_time: u32,
12717}
12718impl FLIGHT_INFORMATION_DATA {
12719    pub const ENCODED_LEN: usize = 32usize;
12720    pub const DEFAULT: Self = Self {
12721        arming_time_utc: 0_u64,
12722        takeoff_time_utc: 0_u64,
12723        flight_uuid: 0_u64,
12724        time_boot_ms: 0_u32,
12725        landing_time: 0_u32,
12726    };
12727    #[cfg(feature = "arbitrary")]
12728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12729        use arbitrary::{Arbitrary, Unstructured};
12730        let mut buf = [0u8; 1024];
12731        rng.fill_bytes(&mut buf);
12732        let mut unstructured = Unstructured::new(&buf);
12733        Self::arbitrary(&mut unstructured).unwrap_or_default()
12734    }
12735}
12736impl Default for FLIGHT_INFORMATION_DATA {
12737    fn default() -> Self {
12738        Self::DEFAULT.clone()
12739    }
12740}
12741impl MessageData for FLIGHT_INFORMATION_DATA {
12742    type Message = MavMessage;
12743    const ID: u32 = 264u32;
12744    const NAME: &'static str = "FLIGHT_INFORMATION";
12745    const EXTRA_CRC: u8 = 49u8;
12746    const ENCODED_LEN: usize = 32usize;
12747    fn deser(
12748        _version: MavlinkVersion,
12749        __input: &[u8],
12750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12751        let avail_len = __input.len();
12752        let mut payload_buf = [0; Self::ENCODED_LEN];
12753        let mut buf = if avail_len < Self::ENCODED_LEN {
12754            payload_buf[0..avail_len].copy_from_slice(__input);
12755            Bytes::new(&payload_buf)
12756        } else {
12757            Bytes::new(__input)
12758        };
12759        let mut __struct = Self::default();
12760        __struct.arming_time_utc = buf.get_u64_le();
12761        __struct.takeoff_time_utc = buf.get_u64_le();
12762        __struct.flight_uuid = buf.get_u64_le();
12763        __struct.time_boot_ms = buf.get_u32_le();
12764        __struct.landing_time = buf.get_u32_le();
12765        Ok(__struct)
12766    }
12767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12768        let mut __tmp = BytesMut::new(bytes);
12769        #[allow(clippy::absurd_extreme_comparisons)]
12770        #[allow(unused_comparisons)]
12771        if __tmp.remaining() < Self::ENCODED_LEN {
12772            panic!(
12773                "buffer is too small (need {} bytes, but got {})",
12774                Self::ENCODED_LEN,
12775                __tmp.remaining(),
12776            )
12777        }
12778        __tmp.put_u64_le(self.arming_time_utc);
12779        __tmp.put_u64_le(self.takeoff_time_utc);
12780        __tmp.put_u64_le(self.flight_uuid);
12781        __tmp.put_u32_le(self.time_boot_ms);
12782        if matches!(version, MavlinkVersion::V2) {
12783            __tmp.put_u32_le(self.landing_time);
12784            let len = __tmp.len();
12785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12786        } else {
12787            __tmp.len()
12788        }
12789    }
12790}
12791#[doc = "Current motion information from a designated system."]
12792#[doc = ""]
12793#[doc = "ID: 144"]
12794#[derive(Debug, Clone, PartialEq)]
12795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12797#[cfg_attr(feature = "ts", derive(TS))]
12798#[cfg_attr(feature = "ts", ts(export))]
12799pub struct FOLLOW_TARGET_DATA {
12800    #[doc = "Timestamp (time since system boot)."]
12801    pub timestamp: u64,
12802    #[doc = "button states or switches of a tracker device"]
12803    pub custom_state: u64,
12804    #[doc = "Latitude (WGS84)"]
12805    pub lat: i32,
12806    #[doc = "Longitude (WGS84)"]
12807    pub lon: i32,
12808    #[doc = "Altitude (MSL)"]
12809    pub alt: f32,
12810    #[doc = "target velocity (0,0,0) for unknown"]
12811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12812    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12813    pub vel: [f32; 3],
12814    #[doc = "linear target acceleration (0,0,0) for unknown"]
12815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12817    pub acc: [f32; 3],
12818    #[doc = "(0 0 0 0 for unknown)"]
12819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12820    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12821    pub attitude_q: [f32; 4],
12822    #[doc = "(0 0 0 for unknown)"]
12823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12825    pub rates: [f32; 3],
12826    #[doc = "eph epv"]
12827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12829    pub position_cov: [f32; 3],
12830    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12831    pub est_capabilities: u8,
12832}
12833impl FOLLOW_TARGET_DATA {
12834    pub const ENCODED_LEN: usize = 93usize;
12835    pub const DEFAULT: Self = Self {
12836        timestamp: 0_u64,
12837        custom_state: 0_u64,
12838        lat: 0_i32,
12839        lon: 0_i32,
12840        alt: 0.0_f32,
12841        vel: [0.0_f32; 3usize],
12842        acc: [0.0_f32; 3usize],
12843        attitude_q: [0.0_f32; 4usize],
12844        rates: [0.0_f32; 3usize],
12845        position_cov: [0.0_f32; 3usize],
12846        est_capabilities: 0_u8,
12847    };
12848    #[cfg(feature = "arbitrary")]
12849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12850        use arbitrary::{Arbitrary, Unstructured};
12851        let mut buf = [0u8; 1024];
12852        rng.fill_bytes(&mut buf);
12853        let mut unstructured = Unstructured::new(&buf);
12854        Self::arbitrary(&mut unstructured).unwrap_or_default()
12855    }
12856}
12857impl Default for FOLLOW_TARGET_DATA {
12858    fn default() -> Self {
12859        Self::DEFAULT.clone()
12860    }
12861}
12862impl MessageData for FOLLOW_TARGET_DATA {
12863    type Message = MavMessage;
12864    const ID: u32 = 144u32;
12865    const NAME: &'static str = "FOLLOW_TARGET";
12866    const EXTRA_CRC: u8 = 127u8;
12867    const ENCODED_LEN: usize = 93usize;
12868    fn deser(
12869        _version: MavlinkVersion,
12870        __input: &[u8],
12871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12872        let avail_len = __input.len();
12873        let mut payload_buf = [0; Self::ENCODED_LEN];
12874        let mut buf = if avail_len < Self::ENCODED_LEN {
12875            payload_buf[0..avail_len].copy_from_slice(__input);
12876            Bytes::new(&payload_buf)
12877        } else {
12878            Bytes::new(__input)
12879        };
12880        let mut __struct = Self::default();
12881        __struct.timestamp = buf.get_u64_le();
12882        __struct.custom_state = buf.get_u64_le();
12883        __struct.lat = buf.get_i32_le();
12884        __struct.lon = buf.get_i32_le();
12885        __struct.alt = buf.get_f32_le();
12886        for v in &mut __struct.vel {
12887            let val = buf.get_f32_le();
12888            *v = val;
12889        }
12890        for v in &mut __struct.acc {
12891            let val = buf.get_f32_le();
12892            *v = val;
12893        }
12894        for v in &mut __struct.attitude_q {
12895            let val = buf.get_f32_le();
12896            *v = val;
12897        }
12898        for v in &mut __struct.rates {
12899            let val = buf.get_f32_le();
12900            *v = val;
12901        }
12902        for v in &mut __struct.position_cov {
12903            let val = buf.get_f32_le();
12904            *v = val;
12905        }
12906        __struct.est_capabilities = buf.get_u8();
12907        Ok(__struct)
12908    }
12909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12910        let mut __tmp = BytesMut::new(bytes);
12911        #[allow(clippy::absurd_extreme_comparisons)]
12912        #[allow(unused_comparisons)]
12913        if __tmp.remaining() < Self::ENCODED_LEN {
12914            panic!(
12915                "buffer is too small (need {} bytes, but got {})",
12916                Self::ENCODED_LEN,
12917                __tmp.remaining(),
12918            )
12919        }
12920        __tmp.put_u64_le(self.timestamp);
12921        __tmp.put_u64_le(self.custom_state);
12922        __tmp.put_i32_le(self.lat);
12923        __tmp.put_i32_le(self.lon);
12924        __tmp.put_f32_le(self.alt);
12925        for val in &self.vel {
12926            __tmp.put_f32_le(*val);
12927        }
12928        for val in &self.acc {
12929            __tmp.put_f32_le(*val);
12930        }
12931        for val in &self.attitude_q {
12932            __tmp.put_f32_le(*val);
12933        }
12934        for val in &self.rates {
12935            __tmp.put_f32_le(*val);
12936        }
12937        for val in &self.position_cov {
12938            __tmp.put_f32_le(*val);
12939        }
12940        __tmp.put_u8(self.est_capabilities);
12941        if matches!(version, MavlinkVersion::V2) {
12942            let len = __tmp.len();
12943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12944        } else {
12945            __tmp.len()
12946        }
12947    }
12948}
12949#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12950#[doc = ""]
12951#[doc = "ID: 371"]
12952#[derive(Debug, Clone, PartialEq)]
12953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12955#[cfg_attr(feature = "ts", derive(TS))]
12956#[cfg_attr(feature = "ts", ts(export))]
12957pub struct FUEL_STATUS_DATA {
12958    #[doc = "Capacity when full. Must be provided."]
12959    pub maximum_fuel: f32,
12960    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12961    pub consumed_fuel: f32,
12962    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12963    pub remaining_fuel: f32,
12964    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12965    pub flow_rate: f32,
12966    #[doc = "Fuel temperature. NaN: field not provided."]
12967    pub temperature: f32,
12968    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12969    pub fuel_type: MavFuelType,
12970    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12971    pub id: u8,
12972    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12973    pub percent_remaining: u8,
12974}
12975impl FUEL_STATUS_DATA {
12976    pub const ENCODED_LEN: usize = 26usize;
12977    pub const DEFAULT: Self = Self {
12978        maximum_fuel: 0.0_f32,
12979        consumed_fuel: 0.0_f32,
12980        remaining_fuel: 0.0_f32,
12981        flow_rate: 0.0_f32,
12982        temperature: 0.0_f32,
12983        fuel_type: MavFuelType::DEFAULT,
12984        id: 0_u8,
12985        percent_remaining: 0_u8,
12986    };
12987    #[cfg(feature = "arbitrary")]
12988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12989        use arbitrary::{Arbitrary, Unstructured};
12990        let mut buf = [0u8; 1024];
12991        rng.fill_bytes(&mut buf);
12992        let mut unstructured = Unstructured::new(&buf);
12993        Self::arbitrary(&mut unstructured).unwrap_or_default()
12994    }
12995}
12996impl Default for FUEL_STATUS_DATA {
12997    fn default() -> Self {
12998        Self::DEFAULT.clone()
12999    }
13000}
13001impl MessageData for FUEL_STATUS_DATA {
13002    type Message = MavMessage;
13003    const ID: u32 = 371u32;
13004    const NAME: &'static str = "FUEL_STATUS";
13005    const EXTRA_CRC: u8 = 10u8;
13006    const ENCODED_LEN: usize = 26usize;
13007    fn deser(
13008        _version: MavlinkVersion,
13009        __input: &[u8],
13010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13011        let avail_len = __input.len();
13012        let mut payload_buf = [0; Self::ENCODED_LEN];
13013        let mut buf = if avail_len < Self::ENCODED_LEN {
13014            payload_buf[0..avail_len].copy_from_slice(__input);
13015            Bytes::new(&payload_buf)
13016        } else {
13017            Bytes::new(__input)
13018        };
13019        let mut __struct = Self::default();
13020        __struct.maximum_fuel = buf.get_f32_le();
13021        __struct.consumed_fuel = buf.get_f32_le();
13022        __struct.remaining_fuel = buf.get_f32_le();
13023        __struct.flow_rate = buf.get_f32_le();
13024        __struct.temperature = buf.get_f32_le();
13025        let tmp = buf.get_u32_le();
13026        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
13027            ::mavlink_core::error::ParserError::InvalidEnum {
13028                enum_type: "MavFuelType",
13029                value: tmp as u32,
13030            },
13031        )?;
13032        __struct.id = buf.get_u8();
13033        __struct.percent_remaining = buf.get_u8();
13034        Ok(__struct)
13035    }
13036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13037        let mut __tmp = BytesMut::new(bytes);
13038        #[allow(clippy::absurd_extreme_comparisons)]
13039        #[allow(unused_comparisons)]
13040        if __tmp.remaining() < Self::ENCODED_LEN {
13041            panic!(
13042                "buffer is too small (need {} bytes, but got {})",
13043                Self::ENCODED_LEN,
13044                __tmp.remaining(),
13045            )
13046        }
13047        __tmp.put_f32_le(self.maximum_fuel);
13048        __tmp.put_f32_le(self.consumed_fuel);
13049        __tmp.put_f32_le(self.remaining_fuel);
13050        __tmp.put_f32_le(self.flow_rate);
13051        __tmp.put_f32_le(self.temperature);
13052        __tmp.put_u32_le(self.fuel_type as u32);
13053        __tmp.put_u8(self.id);
13054        __tmp.put_u8(self.percent_remaining);
13055        if matches!(version, MavlinkVersion::V2) {
13056            let len = __tmp.len();
13057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13058        } else {
13059            __tmp.len()
13060        }
13061    }
13062}
13063#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13064#[doc = ""]
13065#[doc = "ID: 373"]
13066#[derive(Debug, Clone, PartialEq)]
13067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13069#[cfg_attr(feature = "ts", derive(TS))]
13070#[cfg_attr(feature = "ts", ts(export))]
13071pub struct GENERATOR_STATUS_DATA {
13072    #[doc = "Status flags."]
13073    pub status: MavGeneratorStatusFlag,
13074    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13075    pub battery_current: f32,
13076    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13077    pub load_current: f32,
13078    #[doc = "The power being generated. NaN: field not provided"]
13079    pub power_generated: f32,
13080    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13081    pub bus_voltage: f32,
13082    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13083    pub bat_current_setpoint: f32,
13084    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13085    pub runtime: u32,
13086    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13087    pub time_until_maintenance: i32,
13088    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13089    pub generator_speed: u16,
13090    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13091    pub rectifier_temperature: i16,
13092    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13093    pub generator_temperature: i16,
13094}
13095impl GENERATOR_STATUS_DATA {
13096    pub const ENCODED_LEN: usize = 42usize;
13097    pub const DEFAULT: Self = Self {
13098        status: MavGeneratorStatusFlag::DEFAULT,
13099        battery_current: 0.0_f32,
13100        load_current: 0.0_f32,
13101        power_generated: 0.0_f32,
13102        bus_voltage: 0.0_f32,
13103        bat_current_setpoint: 0.0_f32,
13104        runtime: 0_u32,
13105        time_until_maintenance: 0_i32,
13106        generator_speed: 0_u16,
13107        rectifier_temperature: 0_i16,
13108        generator_temperature: 0_i16,
13109    };
13110    #[cfg(feature = "arbitrary")]
13111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13112        use arbitrary::{Arbitrary, Unstructured};
13113        let mut buf = [0u8; 1024];
13114        rng.fill_bytes(&mut buf);
13115        let mut unstructured = Unstructured::new(&buf);
13116        Self::arbitrary(&mut unstructured).unwrap_or_default()
13117    }
13118}
13119impl Default for GENERATOR_STATUS_DATA {
13120    fn default() -> Self {
13121        Self::DEFAULT.clone()
13122    }
13123}
13124impl MessageData for GENERATOR_STATUS_DATA {
13125    type Message = MavMessage;
13126    const ID: u32 = 373u32;
13127    const NAME: &'static str = "GENERATOR_STATUS";
13128    const EXTRA_CRC: u8 = 117u8;
13129    const ENCODED_LEN: usize = 42usize;
13130    fn deser(
13131        _version: MavlinkVersion,
13132        __input: &[u8],
13133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13134        let avail_len = __input.len();
13135        let mut payload_buf = [0; Self::ENCODED_LEN];
13136        let mut buf = if avail_len < Self::ENCODED_LEN {
13137            payload_buf[0..avail_len].copy_from_slice(__input);
13138            Bytes::new(&payload_buf)
13139        } else {
13140            Bytes::new(__input)
13141        };
13142        let mut __struct = Self::default();
13143        let tmp = buf.get_u64_le();
13144        __struct.status = MavGeneratorStatusFlag::from_bits(
13145            tmp & MavGeneratorStatusFlag::all().bits(),
13146        )
13147        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13148            flag_type: "MavGeneratorStatusFlag",
13149            value: tmp as u32,
13150        })?;
13151        __struct.battery_current = buf.get_f32_le();
13152        __struct.load_current = buf.get_f32_le();
13153        __struct.power_generated = buf.get_f32_le();
13154        __struct.bus_voltage = buf.get_f32_le();
13155        __struct.bat_current_setpoint = buf.get_f32_le();
13156        __struct.runtime = buf.get_u32_le();
13157        __struct.time_until_maintenance = buf.get_i32_le();
13158        __struct.generator_speed = buf.get_u16_le();
13159        __struct.rectifier_temperature = buf.get_i16_le();
13160        __struct.generator_temperature = buf.get_i16_le();
13161        Ok(__struct)
13162    }
13163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13164        let mut __tmp = BytesMut::new(bytes);
13165        #[allow(clippy::absurd_extreme_comparisons)]
13166        #[allow(unused_comparisons)]
13167        if __tmp.remaining() < Self::ENCODED_LEN {
13168            panic!(
13169                "buffer is too small (need {} bytes, but got {})",
13170                Self::ENCODED_LEN,
13171                __tmp.remaining(),
13172            )
13173        }
13174        __tmp.put_u64_le(self.status.bits());
13175        __tmp.put_f32_le(self.battery_current);
13176        __tmp.put_f32_le(self.load_current);
13177        __tmp.put_f32_le(self.power_generated);
13178        __tmp.put_f32_le(self.bus_voltage);
13179        __tmp.put_f32_le(self.bat_current_setpoint);
13180        __tmp.put_u32_le(self.runtime);
13181        __tmp.put_i32_le(self.time_until_maintenance);
13182        __tmp.put_u16_le(self.generator_speed);
13183        __tmp.put_i16_le(self.rectifier_temperature);
13184        __tmp.put_i16_le(self.generator_temperature);
13185        if matches!(version, MavlinkVersion::V2) {
13186            let len = __tmp.len();
13187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13188        } else {
13189            __tmp.len()
13190        }
13191    }
13192}
13193#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13194#[doc = ""]
13195#[doc = "ID: 285"]
13196#[derive(Debug, Clone, PartialEq)]
13197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13199#[cfg_attr(feature = "ts", derive(TS))]
13200#[cfg_attr(feature = "ts", ts(export))]
13201pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13202    #[doc = "Timestamp (time since system boot)."]
13203    pub time_boot_ms: u32,
13204    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13207    pub q: [f32; 4],
13208    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13209    pub angular_velocity_x: f32,
13210    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13211    pub angular_velocity_y: f32,
13212    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13213    pub angular_velocity_z: f32,
13214    #[doc = "Failure flags (0 for no failure)"]
13215    pub failure_flags: GimbalDeviceErrorFlags,
13216    #[doc = "Current gimbal flags set."]
13217    pub flags: GimbalDeviceFlags,
13218    #[doc = "System ID"]
13219    pub target_system: u8,
13220    #[doc = "Component ID"]
13221    pub target_component: u8,
13222    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13223    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13224    pub delta_yaw: f32,
13225    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13226    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13227    pub delta_yaw_velocity: f32,
13228    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13229    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13230    pub gimbal_device_id: u8,
13231}
13232impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13233    pub const ENCODED_LEN: usize = 49usize;
13234    pub const DEFAULT: Self = Self {
13235        time_boot_ms: 0_u32,
13236        q: [0.0_f32; 4usize],
13237        angular_velocity_x: 0.0_f32,
13238        angular_velocity_y: 0.0_f32,
13239        angular_velocity_z: 0.0_f32,
13240        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13241        flags: GimbalDeviceFlags::DEFAULT,
13242        target_system: 0_u8,
13243        target_component: 0_u8,
13244        delta_yaw: 0.0_f32,
13245        delta_yaw_velocity: 0.0_f32,
13246        gimbal_device_id: 0_u8,
13247    };
13248    #[cfg(feature = "arbitrary")]
13249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13250        use arbitrary::{Arbitrary, Unstructured};
13251        let mut buf = [0u8; 1024];
13252        rng.fill_bytes(&mut buf);
13253        let mut unstructured = Unstructured::new(&buf);
13254        Self::arbitrary(&mut unstructured).unwrap_or_default()
13255    }
13256}
13257impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13258    fn default() -> Self {
13259        Self::DEFAULT.clone()
13260    }
13261}
13262impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13263    type Message = MavMessage;
13264    const ID: u32 = 285u32;
13265    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13266    const EXTRA_CRC: u8 = 137u8;
13267    const ENCODED_LEN: usize = 49usize;
13268    fn deser(
13269        _version: MavlinkVersion,
13270        __input: &[u8],
13271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13272        let avail_len = __input.len();
13273        let mut payload_buf = [0; Self::ENCODED_LEN];
13274        let mut buf = if avail_len < Self::ENCODED_LEN {
13275            payload_buf[0..avail_len].copy_from_slice(__input);
13276            Bytes::new(&payload_buf)
13277        } else {
13278            Bytes::new(__input)
13279        };
13280        let mut __struct = Self::default();
13281        __struct.time_boot_ms = buf.get_u32_le();
13282        for v in &mut __struct.q {
13283            let val = buf.get_f32_le();
13284            *v = val;
13285        }
13286        __struct.angular_velocity_x = buf.get_f32_le();
13287        __struct.angular_velocity_y = buf.get_f32_le();
13288        __struct.angular_velocity_z = buf.get_f32_le();
13289        let tmp = buf.get_u32_le();
13290        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
13291            tmp & GimbalDeviceErrorFlags::all().bits(),
13292        )
13293        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13294            flag_type: "GimbalDeviceErrorFlags",
13295            value: tmp as u32,
13296        })?;
13297        let tmp = buf.get_u16_le();
13298        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13299            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13300                flag_type: "GimbalDeviceFlags",
13301                value: tmp as u32,
13302            })?;
13303        __struct.target_system = buf.get_u8();
13304        __struct.target_component = buf.get_u8();
13305        __struct.delta_yaw = buf.get_f32_le();
13306        __struct.delta_yaw_velocity = buf.get_f32_le();
13307        __struct.gimbal_device_id = buf.get_u8();
13308        Ok(__struct)
13309    }
13310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13311        let mut __tmp = BytesMut::new(bytes);
13312        #[allow(clippy::absurd_extreme_comparisons)]
13313        #[allow(unused_comparisons)]
13314        if __tmp.remaining() < Self::ENCODED_LEN {
13315            panic!(
13316                "buffer is too small (need {} bytes, but got {})",
13317                Self::ENCODED_LEN,
13318                __tmp.remaining(),
13319            )
13320        }
13321        __tmp.put_u32_le(self.time_boot_ms);
13322        for val in &self.q {
13323            __tmp.put_f32_le(*val);
13324        }
13325        __tmp.put_f32_le(self.angular_velocity_x);
13326        __tmp.put_f32_le(self.angular_velocity_y);
13327        __tmp.put_f32_le(self.angular_velocity_z);
13328        __tmp.put_u32_le(self.failure_flags.bits());
13329        __tmp.put_u16_le(self.flags.bits());
13330        __tmp.put_u8(self.target_system);
13331        __tmp.put_u8(self.target_component);
13332        if matches!(version, MavlinkVersion::V2) {
13333            __tmp.put_f32_le(self.delta_yaw);
13334            __tmp.put_f32_le(self.delta_yaw_velocity);
13335            __tmp.put_u8(self.gimbal_device_id);
13336            let len = __tmp.len();
13337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13338        } else {
13339            __tmp.len()
13340        }
13341    }
13342}
13343#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13344#[doc = ""]
13345#[doc = "ID: 283"]
13346#[derive(Debug, Clone, PartialEq)]
13347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13349#[cfg_attr(feature = "ts", derive(TS))]
13350#[cfg_attr(feature = "ts", ts(export))]
13351pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13352    #[doc = "UID of gimbal hardware (0 if unknown)."]
13353    pub uid: u64,
13354    #[doc = "Timestamp (time since system boot)."]
13355    pub time_boot_ms: u32,
13356    #[doc = "0xff)."]
13357    pub firmware_version: u32,
13358    #[doc = "0xff)."]
13359    pub hardware_version: u32,
13360    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13361    pub roll_min: f32,
13362    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13363    pub roll_max: f32,
13364    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13365    pub pitch_min: f32,
13366    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13367    pub pitch_max: f32,
13368    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13369    pub yaw_min: f32,
13370    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13371    pub yaw_max: f32,
13372    #[doc = "Bitmap of gimbal capability flags."]
13373    pub cap_flags: GimbalDeviceCapFlags,
13374    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13375    pub custom_cap_flags: u16,
13376    #[doc = "Name of the gimbal vendor."]
13377    #[cfg_attr(feature = "ts", ts(type = "string"))]
13378    pub vendor_name: CharArray<32>,
13379    #[doc = "Name of the gimbal model."]
13380    #[cfg_attr(feature = "ts", ts(type = "string"))]
13381    pub model_name: CharArray<32>,
13382    #[doc = "Custom name of the gimbal given to it by the user."]
13383    #[cfg_attr(feature = "ts", ts(type = "string"))]
13384    pub custom_name: CharArray<32>,
13385    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13386    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13387    pub gimbal_device_id: u8,
13388}
13389impl GIMBAL_DEVICE_INFORMATION_DATA {
13390    pub const ENCODED_LEN: usize = 145usize;
13391    pub const DEFAULT: Self = Self {
13392        uid: 0_u64,
13393        time_boot_ms: 0_u32,
13394        firmware_version: 0_u32,
13395        hardware_version: 0_u32,
13396        roll_min: 0.0_f32,
13397        roll_max: 0.0_f32,
13398        pitch_min: 0.0_f32,
13399        pitch_max: 0.0_f32,
13400        yaw_min: 0.0_f32,
13401        yaw_max: 0.0_f32,
13402        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13403        custom_cap_flags: 0_u16,
13404        vendor_name: CharArray::new([0_u8; 32usize]),
13405        model_name: CharArray::new([0_u8; 32usize]),
13406        custom_name: CharArray::new([0_u8; 32usize]),
13407        gimbal_device_id: 0_u8,
13408    };
13409    #[cfg(feature = "arbitrary")]
13410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13411        use arbitrary::{Arbitrary, Unstructured};
13412        let mut buf = [0u8; 1024];
13413        rng.fill_bytes(&mut buf);
13414        let mut unstructured = Unstructured::new(&buf);
13415        Self::arbitrary(&mut unstructured).unwrap_or_default()
13416    }
13417}
13418impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13419    fn default() -> Self {
13420        Self::DEFAULT.clone()
13421    }
13422}
13423impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13424    type Message = MavMessage;
13425    const ID: u32 = 283u32;
13426    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13427    const EXTRA_CRC: u8 = 74u8;
13428    const ENCODED_LEN: usize = 145usize;
13429    fn deser(
13430        _version: MavlinkVersion,
13431        __input: &[u8],
13432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13433        let avail_len = __input.len();
13434        let mut payload_buf = [0; Self::ENCODED_LEN];
13435        let mut buf = if avail_len < Self::ENCODED_LEN {
13436            payload_buf[0..avail_len].copy_from_slice(__input);
13437            Bytes::new(&payload_buf)
13438        } else {
13439            Bytes::new(__input)
13440        };
13441        let mut __struct = Self::default();
13442        __struct.uid = buf.get_u64_le();
13443        __struct.time_boot_ms = buf.get_u32_le();
13444        __struct.firmware_version = buf.get_u32_le();
13445        __struct.hardware_version = buf.get_u32_le();
13446        __struct.roll_min = buf.get_f32_le();
13447        __struct.roll_max = buf.get_f32_le();
13448        __struct.pitch_min = buf.get_f32_le();
13449        __struct.pitch_max = buf.get_f32_le();
13450        __struct.yaw_min = buf.get_f32_le();
13451        __struct.yaw_max = buf.get_f32_le();
13452        let tmp = buf.get_u16_le();
13453        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13454            tmp & GimbalDeviceCapFlags::all().bits(),
13455        )
13456        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13457            flag_type: "GimbalDeviceCapFlags",
13458            value: tmp as u32,
13459        })?;
13460        __struct.custom_cap_flags = buf.get_u16_le();
13461        let mut tmp = [0_u8; 32usize];
13462        for v in &mut tmp {
13463            *v = buf.get_u8();
13464        }
13465        __struct.vendor_name = CharArray::new(tmp);
13466        let mut tmp = [0_u8; 32usize];
13467        for v in &mut tmp {
13468            *v = buf.get_u8();
13469        }
13470        __struct.model_name = CharArray::new(tmp);
13471        let mut tmp = [0_u8; 32usize];
13472        for v in &mut tmp {
13473            *v = buf.get_u8();
13474        }
13475        __struct.custom_name = CharArray::new(tmp);
13476        __struct.gimbal_device_id = buf.get_u8();
13477        Ok(__struct)
13478    }
13479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13480        let mut __tmp = BytesMut::new(bytes);
13481        #[allow(clippy::absurd_extreme_comparisons)]
13482        #[allow(unused_comparisons)]
13483        if __tmp.remaining() < Self::ENCODED_LEN {
13484            panic!(
13485                "buffer is too small (need {} bytes, but got {})",
13486                Self::ENCODED_LEN,
13487                __tmp.remaining(),
13488            )
13489        }
13490        __tmp.put_u64_le(self.uid);
13491        __tmp.put_u32_le(self.time_boot_ms);
13492        __tmp.put_u32_le(self.firmware_version);
13493        __tmp.put_u32_le(self.hardware_version);
13494        __tmp.put_f32_le(self.roll_min);
13495        __tmp.put_f32_le(self.roll_max);
13496        __tmp.put_f32_le(self.pitch_min);
13497        __tmp.put_f32_le(self.pitch_max);
13498        __tmp.put_f32_le(self.yaw_min);
13499        __tmp.put_f32_le(self.yaw_max);
13500        __tmp.put_u16_le(self.cap_flags.bits());
13501        __tmp.put_u16_le(self.custom_cap_flags);
13502        for val in &self.vendor_name {
13503            __tmp.put_u8(*val);
13504        }
13505        for val in &self.model_name {
13506            __tmp.put_u8(*val);
13507        }
13508        for val in &self.custom_name {
13509            __tmp.put_u8(*val);
13510        }
13511        if matches!(version, MavlinkVersion::V2) {
13512            __tmp.put_u8(self.gimbal_device_id);
13513            let len = __tmp.len();
13514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13515        } else {
13516            __tmp.len()
13517        }
13518    }
13519}
13520#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13521#[doc = ""]
13522#[doc = "ID: 284"]
13523#[derive(Debug, Clone, PartialEq)]
13524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13526#[cfg_attr(feature = "ts", derive(TS))]
13527#[cfg_attr(feature = "ts", ts(export))]
13528pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13529    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13530    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13531    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13532    pub q: [f32; 4],
13533    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13534    pub angular_velocity_x: f32,
13535    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13536    pub angular_velocity_y: f32,
13537    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13538    pub angular_velocity_z: f32,
13539    #[doc = "Low level gimbal flags."]
13540    pub flags: GimbalDeviceFlags,
13541    #[doc = "System ID"]
13542    pub target_system: u8,
13543    #[doc = "Component ID"]
13544    pub target_component: u8,
13545}
13546impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13547    pub const ENCODED_LEN: usize = 32usize;
13548    pub const DEFAULT: Self = Self {
13549        q: [0.0_f32; 4usize],
13550        angular_velocity_x: 0.0_f32,
13551        angular_velocity_y: 0.0_f32,
13552        angular_velocity_z: 0.0_f32,
13553        flags: GimbalDeviceFlags::DEFAULT,
13554        target_system: 0_u8,
13555        target_component: 0_u8,
13556    };
13557    #[cfg(feature = "arbitrary")]
13558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13559        use arbitrary::{Arbitrary, Unstructured};
13560        let mut buf = [0u8; 1024];
13561        rng.fill_bytes(&mut buf);
13562        let mut unstructured = Unstructured::new(&buf);
13563        Self::arbitrary(&mut unstructured).unwrap_or_default()
13564    }
13565}
13566impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13567    fn default() -> Self {
13568        Self::DEFAULT.clone()
13569    }
13570}
13571impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13572    type Message = MavMessage;
13573    const ID: u32 = 284u32;
13574    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13575    const EXTRA_CRC: u8 = 99u8;
13576    const ENCODED_LEN: usize = 32usize;
13577    fn deser(
13578        _version: MavlinkVersion,
13579        __input: &[u8],
13580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13581        let avail_len = __input.len();
13582        let mut payload_buf = [0; Self::ENCODED_LEN];
13583        let mut buf = if avail_len < Self::ENCODED_LEN {
13584            payload_buf[0..avail_len].copy_from_slice(__input);
13585            Bytes::new(&payload_buf)
13586        } else {
13587            Bytes::new(__input)
13588        };
13589        let mut __struct = Self::default();
13590        for v in &mut __struct.q {
13591            let val = buf.get_f32_le();
13592            *v = val;
13593        }
13594        __struct.angular_velocity_x = buf.get_f32_le();
13595        __struct.angular_velocity_y = buf.get_f32_le();
13596        __struct.angular_velocity_z = buf.get_f32_le();
13597        let tmp = buf.get_u16_le();
13598        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13599            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13600                flag_type: "GimbalDeviceFlags",
13601                value: tmp as u32,
13602            })?;
13603        __struct.target_system = buf.get_u8();
13604        __struct.target_component = buf.get_u8();
13605        Ok(__struct)
13606    }
13607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13608        let mut __tmp = BytesMut::new(bytes);
13609        #[allow(clippy::absurd_extreme_comparisons)]
13610        #[allow(unused_comparisons)]
13611        if __tmp.remaining() < Self::ENCODED_LEN {
13612            panic!(
13613                "buffer is too small (need {} bytes, but got {})",
13614                Self::ENCODED_LEN,
13615                __tmp.remaining(),
13616            )
13617        }
13618        for val in &self.q {
13619            __tmp.put_f32_le(*val);
13620        }
13621        __tmp.put_f32_le(self.angular_velocity_x);
13622        __tmp.put_f32_le(self.angular_velocity_y);
13623        __tmp.put_f32_le(self.angular_velocity_z);
13624        __tmp.put_u16_le(self.flags.bits());
13625        __tmp.put_u8(self.target_system);
13626        __tmp.put_u8(self.target_component);
13627        if matches!(version, MavlinkVersion::V2) {
13628            let len = __tmp.len();
13629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13630        } else {
13631            __tmp.len()
13632        }
13633    }
13634}
13635#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13636#[doc = ""]
13637#[doc = "ID: 280"]
13638#[derive(Debug, Clone, PartialEq)]
13639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13641#[cfg_attr(feature = "ts", derive(TS))]
13642#[cfg_attr(feature = "ts", ts(export))]
13643pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13644    #[doc = "Timestamp (time since system boot)."]
13645    pub time_boot_ms: u32,
13646    #[doc = "Bitmap of gimbal capability flags."]
13647    pub cap_flags: GimbalManagerCapFlags,
13648    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13649    pub roll_min: f32,
13650    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13651    pub roll_max: f32,
13652    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13653    pub pitch_min: f32,
13654    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13655    pub pitch_max: f32,
13656    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13657    pub yaw_min: f32,
13658    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13659    pub yaw_max: f32,
13660    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13661    pub gimbal_device_id: u8,
13662}
13663impl GIMBAL_MANAGER_INFORMATION_DATA {
13664    pub const ENCODED_LEN: usize = 33usize;
13665    pub const DEFAULT: Self = Self {
13666        time_boot_ms: 0_u32,
13667        cap_flags: GimbalManagerCapFlags::DEFAULT,
13668        roll_min: 0.0_f32,
13669        roll_max: 0.0_f32,
13670        pitch_min: 0.0_f32,
13671        pitch_max: 0.0_f32,
13672        yaw_min: 0.0_f32,
13673        yaw_max: 0.0_f32,
13674        gimbal_device_id: 0_u8,
13675    };
13676    #[cfg(feature = "arbitrary")]
13677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13678        use arbitrary::{Arbitrary, Unstructured};
13679        let mut buf = [0u8; 1024];
13680        rng.fill_bytes(&mut buf);
13681        let mut unstructured = Unstructured::new(&buf);
13682        Self::arbitrary(&mut unstructured).unwrap_or_default()
13683    }
13684}
13685impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13686    fn default() -> Self {
13687        Self::DEFAULT.clone()
13688    }
13689}
13690impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13691    type Message = MavMessage;
13692    const ID: u32 = 280u32;
13693    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13694    const EXTRA_CRC: u8 = 70u8;
13695    const ENCODED_LEN: usize = 33usize;
13696    fn deser(
13697        _version: MavlinkVersion,
13698        __input: &[u8],
13699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13700        let avail_len = __input.len();
13701        let mut payload_buf = [0; Self::ENCODED_LEN];
13702        let mut buf = if avail_len < Self::ENCODED_LEN {
13703            payload_buf[0..avail_len].copy_from_slice(__input);
13704            Bytes::new(&payload_buf)
13705        } else {
13706            Bytes::new(__input)
13707        };
13708        let mut __struct = Self::default();
13709        __struct.time_boot_ms = buf.get_u32_le();
13710        let tmp = buf.get_u32_le();
13711        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13712            tmp & GimbalManagerCapFlags::all().bits(),
13713        )
13714        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13715            flag_type: "GimbalManagerCapFlags",
13716            value: tmp as u32,
13717        })?;
13718        __struct.roll_min = buf.get_f32_le();
13719        __struct.roll_max = buf.get_f32_le();
13720        __struct.pitch_min = buf.get_f32_le();
13721        __struct.pitch_max = buf.get_f32_le();
13722        __struct.yaw_min = buf.get_f32_le();
13723        __struct.yaw_max = buf.get_f32_le();
13724        __struct.gimbal_device_id = buf.get_u8();
13725        Ok(__struct)
13726    }
13727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13728        let mut __tmp = BytesMut::new(bytes);
13729        #[allow(clippy::absurd_extreme_comparisons)]
13730        #[allow(unused_comparisons)]
13731        if __tmp.remaining() < Self::ENCODED_LEN {
13732            panic!(
13733                "buffer is too small (need {} bytes, but got {})",
13734                Self::ENCODED_LEN,
13735                __tmp.remaining(),
13736            )
13737        }
13738        __tmp.put_u32_le(self.time_boot_ms);
13739        __tmp.put_u32_le(self.cap_flags.bits());
13740        __tmp.put_f32_le(self.roll_min);
13741        __tmp.put_f32_le(self.roll_max);
13742        __tmp.put_f32_le(self.pitch_min);
13743        __tmp.put_f32_le(self.pitch_max);
13744        __tmp.put_f32_le(self.yaw_min);
13745        __tmp.put_f32_le(self.yaw_max);
13746        __tmp.put_u8(self.gimbal_device_id);
13747        if matches!(version, MavlinkVersion::V2) {
13748            let len = __tmp.len();
13749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13750        } else {
13751            __tmp.len()
13752        }
13753    }
13754}
13755#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13756#[doc = ""]
13757#[doc = "ID: 282"]
13758#[derive(Debug, Clone, PartialEq)]
13759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13761#[cfg_attr(feature = "ts", derive(TS))]
13762#[cfg_attr(feature = "ts", ts(export))]
13763pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13764    #[doc = "High level gimbal manager flags to use."]
13765    pub flags: GimbalManagerFlags,
13766    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13768    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13769    pub q: [f32; 4],
13770    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13771    pub angular_velocity_x: f32,
13772    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13773    pub angular_velocity_y: f32,
13774    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13775    pub angular_velocity_z: f32,
13776    #[doc = "System ID"]
13777    pub target_system: u8,
13778    #[doc = "Component ID"]
13779    pub target_component: u8,
13780    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13781    pub gimbal_device_id: u8,
13782}
13783impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13784    pub const ENCODED_LEN: usize = 35usize;
13785    pub const DEFAULT: Self = Self {
13786        flags: GimbalManagerFlags::DEFAULT,
13787        q: [0.0_f32; 4usize],
13788        angular_velocity_x: 0.0_f32,
13789        angular_velocity_y: 0.0_f32,
13790        angular_velocity_z: 0.0_f32,
13791        target_system: 0_u8,
13792        target_component: 0_u8,
13793        gimbal_device_id: 0_u8,
13794    };
13795    #[cfg(feature = "arbitrary")]
13796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13797        use arbitrary::{Arbitrary, Unstructured};
13798        let mut buf = [0u8; 1024];
13799        rng.fill_bytes(&mut buf);
13800        let mut unstructured = Unstructured::new(&buf);
13801        Self::arbitrary(&mut unstructured).unwrap_or_default()
13802    }
13803}
13804impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13805    fn default() -> Self {
13806        Self::DEFAULT.clone()
13807    }
13808}
13809impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13810    type Message = MavMessage;
13811    const ID: u32 = 282u32;
13812    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13813    const EXTRA_CRC: u8 = 123u8;
13814    const ENCODED_LEN: usize = 35usize;
13815    fn deser(
13816        _version: MavlinkVersion,
13817        __input: &[u8],
13818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13819        let avail_len = __input.len();
13820        let mut payload_buf = [0; Self::ENCODED_LEN];
13821        let mut buf = if avail_len < Self::ENCODED_LEN {
13822            payload_buf[0..avail_len].copy_from_slice(__input);
13823            Bytes::new(&payload_buf)
13824        } else {
13825            Bytes::new(__input)
13826        };
13827        let mut __struct = Self::default();
13828        let tmp = buf.get_u32_le();
13829        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13830            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13831                flag_type: "GimbalManagerFlags",
13832                value: tmp as u32,
13833            })?;
13834        for v in &mut __struct.q {
13835            let val = buf.get_f32_le();
13836            *v = val;
13837        }
13838        __struct.angular_velocity_x = buf.get_f32_le();
13839        __struct.angular_velocity_y = buf.get_f32_le();
13840        __struct.angular_velocity_z = buf.get_f32_le();
13841        __struct.target_system = buf.get_u8();
13842        __struct.target_component = buf.get_u8();
13843        __struct.gimbal_device_id = buf.get_u8();
13844        Ok(__struct)
13845    }
13846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13847        let mut __tmp = BytesMut::new(bytes);
13848        #[allow(clippy::absurd_extreme_comparisons)]
13849        #[allow(unused_comparisons)]
13850        if __tmp.remaining() < Self::ENCODED_LEN {
13851            panic!(
13852                "buffer is too small (need {} bytes, but got {})",
13853                Self::ENCODED_LEN,
13854                __tmp.remaining(),
13855            )
13856        }
13857        __tmp.put_u32_le(self.flags.bits());
13858        for val in &self.q {
13859            __tmp.put_f32_le(*val);
13860        }
13861        __tmp.put_f32_le(self.angular_velocity_x);
13862        __tmp.put_f32_le(self.angular_velocity_y);
13863        __tmp.put_f32_le(self.angular_velocity_z);
13864        __tmp.put_u8(self.target_system);
13865        __tmp.put_u8(self.target_component);
13866        __tmp.put_u8(self.gimbal_device_id);
13867        if matches!(version, MavlinkVersion::V2) {
13868            let len = __tmp.len();
13869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13870        } else {
13871            __tmp.len()
13872        }
13873    }
13874}
13875#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13876#[doc = ""]
13877#[doc = "ID: 288"]
13878#[derive(Debug, Clone, PartialEq)]
13879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13881#[cfg_attr(feature = "ts", derive(TS))]
13882#[cfg_attr(feature = "ts", ts(export))]
13883pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13884    #[doc = "High level gimbal manager flags."]
13885    pub flags: GimbalManagerFlags,
13886    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13887    pub pitch: f32,
13888    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13889    pub yaw: f32,
13890    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13891    pub pitch_rate: f32,
13892    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13893    pub yaw_rate: f32,
13894    #[doc = "System ID"]
13895    pub target_system: u8,
13896    #[doc = "Component ID"]
13897    pub target_component: u8,
13898    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13899    pub gimbal_device_id: u8,
13900}
13901impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13902    pub const ENCODED_LEN: usize = 23usize;
13903    pub const DEFAULT: Self = Self {
13904        flags: GimbalManagerFlags::DEFAULT,
13905        pitch: 0.0_f32,
13906        yaw: 0.0_f32,
13907        pitch_rate: 0.0_f32,
13908        yaw_rate: 0.0_f32,
13909        target_system: 0_u8,
13910        target_component: 0_u8,
13911        gimbal_device_id: 0_u8,
13912    };
13913    #[cfg(feature = "arbitrary")]
13914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13915        use arbitrary::{Arbitrary, Unstructured};
13916        let mut buf = [0u8; 1024];
13917        rng.fill_bytes(&mut buf);
13918        let mut unstructured = Unstructured::new(&buf);
13919        Self::arbitrary(&mut unstructured).unwrap_or_default()
13920    }
13921}
13922impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13923    fn default() -> Self {
13924        Self::DEFAULT.clone()
13925    }
13926}
13927impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13928    type Message = MavMessage;
13929    const ID: u32 = 288u32;
13930    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13931    const EXTRA_CRC: u8 = 20u8;
13932    const ENCODED_LEN: usize = 23usize;
13933    fn deser(
13934        _version: MavlinkVersion,
13935        __input: &[u8],
13936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13937        let avail_len = __input.len();
13938        let mut payload_buf = [0; Self::ENCODED_LEN];
13939        let mut buf = if avail_len < Self::ENCODED_LEN {
13940            payload_buf[0..avail_len].copy_from_slice(__input);
13941            Bytes::new(&payload_buf)
13942        } else {
13943            Bytes::new(__input)
13944        };
13945        let mut __struct = Self::default();
13946        let tmp = buf.get_u32_le();
13947        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13948            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13949                flag_type: "GimbalManagerFlags",
13950                value: tmp as u32,
13951            })?;
13952        __struct.pitch = buf.get_f32_le();
13953        __struct.yaw = buf.get_f32_le();
13954        __struct.pitch_rate = buf.get_f32_le();
13955        __struct.yaw_rate = buf.get_f32_le();
13956        __struct.target_system = buf.get_u8();
13957        __struct.target_component = buf.get_u8();
13958        __struct.gimbal_device_id = buf.get_u8();
13959        Ok(__struct)
13960    }
13961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13962        let mut __tmp = BytesMut::new(bytes);
13963        #[allow(clippy::absurd_extreme_comparisons)]
13964        #[allow(unused_comparisons)]
13965        if __tmp.remaining() < Self::ENCODED_LEN {
13966            panic!(
13967                "buffer is too small (need {} bytes, but got {})",
13968                Self::ENCODED_LEN,
13969                __tmp.remaining(),
13970            )
13971        }
13972        __tmp.put_u32_le(self.flags.bits());
13973        __tmp.put_f32_le(self.pitch);
13974        __tmp.put_f32_le(self.yaw);
13975        __tmp.put_f32_le(self.pitch_rate);
13976        __tmp.put_f32_le(self.yaw_rate);
13977        __tmp.put_u8(self.target_system);
13978        __tmp.put_u8(self.target_component);
13979        __tmp.put_u8(self.gimbal_device_id);
13980        if matches!(version, MavlinkVersion::V2) {
13981            let len = __tmp.len();
13982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13983        } else {
13984            __tmp.len()
13985        }
13986    }
13987}
13988#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13989#[doc = ""]
13990#[doc = "ID: 287"]
13991#[derive(Debug, Clone, PartialEq)]
13992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13994#[cfg_attr(feature = "ts", derive(TS))]
13995#[cfg_attr(feature = "ts", ts(export))]
13996pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13997    #[doc = "High level gimbal manager flags to use."]
13998    pub flags: GimbalManagerFlags,
13999    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
14000    pub pitch: f32,
14001    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
14002    pub yaw: f32,
14003    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
14004    pub pitch_rate: f32,
14005    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
14006    pub yaw_rate: f32,
14007    #[doc = "System ID"]
14008    pub target_system: u8,
14009    #[doc = "Component ID"]
14010    pub target_component: u8,
14011    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14012    pub gimbal_device_id: u8,
14013}
14014impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14015    pub const ENCODED_LEN: usize = 23usize;
14016    pub const DEFAULT: Self = Self {
14017        flags: GimbalManagerFlags::DEFAULT,
14018        pitch: 0.0_f32,
14019        yaw: 0.0_f32,
14020        pitch_rate: 0.0_f32,
14021        yaw_rate: 0.0_f32,
14022        target_system: 0_u8,
14023        target_component: 0_u8,
14024        gimbal_device_id: 0_u8,
14025    };
14026    #[cfg(feature = "arbitrary")]
14027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14028        use arbitrary::{Arbitrary, Unstructured};
14029        let mut buf = [0u8; 1024];
14030        rng.fill_bytes(&mut buf);
14031        let mut unstructured = Unstructured::new(&buf);
14032        Self::arbitrary(&mut unstructured).unwrap_or_default()
14033    }
14034}
14035impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14036    fn default() -> Self {
14037        Self::DEFAULT.clone()
14038    }
14039}
14040impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14041    type Message = MavMessage;
14042    const ID: u32 = 287u32;
14043    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14044    const EXTRA_CRC: u8 = 1u8;
14045    const ENCODED_LEN: usize = 23usize;
14046    fn deser(
14047        _version: MavlinkVersion,
14048        __input: &[u8],
14049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14050        let avail_len = __input.len();
14051        let mut payload_buf = [0; Self::ENCODED_LEN];
14052        let mut buf = if avail_len < Self::ENCODED_LEN {
14053            payload_buf[0..avail_len].copy_from_slice(__input);
14054            Bytes::new(&payload_buf)
14055        } else {
14056            Bytes::new(__input)
14057        };
14058        let mut __struct = Self::default();
14059        let tmp = buf.get_u32_le();
14060        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14061            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14062                flag_type: "GimbalManagerFlags",
14063                value: tmp as u32,
14064            })?;
14065        __struct.pitch = buf.get_f32_le();
14066        __struct.yaw = buf.get_f32_le();
14067        __struct.pitch_rate = buf.get_f32_le();
14068        __struct.yaw_rate = buf.get_f32_le();
14069        __struct.target_system = buf.get_u8();
14070        __struct.target_component = buf.get_u8();
14071        __struct.gimbal_device_id = buf.get_u8();
14072        Ok(__struct)
14073    }
14074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14075        let mut __tmp = BytesMut::new(bytes);
14076        #[allow(clippy::absurd_extreme_comparisons)]
14077        #[allow(unused_comparisons)]
14078        if __tmp.remaining() < Self::ENCODED_LEN {
14079            panic!(
14080                "buffer is too small (need {} bytes, but got {})",
14081                Self::ENCODED_LEN,
14082                __tmp.remaining(),
14083            )
14084        }
14085        __tmp.put_u32_le(self.flags.bits());
14086        __tmp.put_f32_le(self.pitch);
14087        __tmp.put_f32_le(self.yaw);
14088        __tmp.put_f32_le(self.pitch_rate);
14089        __tmp.put_f32_le(self.yaw_rate);
14090        __tmp.put_u8(self.target_system);
14091        __tmp.put_u8(self.target_component);
14092        __tmp.put_u8(self.gimbal_device_id);
14093        if matches!(version, MavlinkVersion::V2) {
14094            let len = __tmp.len();
14095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14096        } else {
14097            __tmp.len()
14098        }
14099    }
14100}
14101#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14102#[doc = ""]
14103#[doc = "ID: 281"]
14104#[derive(Debug, Clone, PartialEq)]
14105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14107#[cfg_attr(feature = "ts", derive(TS))]
14108#[cfg_attr(feature = "ts", ts(export))]
14109pub struct GIMBAL_MANAGER_STATUS_DATA {
14110    #[doc = "Timestamp (time since system boot)."]
14111    pub time_boot_ms: u32,
14112    #[doc = "High level gimbal manager flags currently applied."]
14113    pub flags: GimbalManagerFlags,
14114    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14115    pub gimbal_device_id: u8,
14116    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14117    pub primary_control_sysid: u8,
14118    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14119    pub primary_control_compid: u8,
14120    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14121    pub secondary_control_sysid: u8,
14122    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14123    pub secondary_control_compid: u8,
14124}
14125impl GIMBAL_MANAGER_STATUS_DATA {
14126    pub const ENCODED_LEN: usize = 13usize;
14127    pub const DEFAULT: Self = Self {
14128        time_boot_ms: 0_u32,
14129        flags: GimbalManagerFlags::DEFAULT,
14130        gimbal_device_id: 0_u8,
14131        primary_control_sysid: 0_u8,
14132        primary_control_compid: 0_u8,
14133        secondary_control_sysid: 0_u8,
14134        secondary_control_compid: 0_u8,
14135    };
14136    #[cfg(feature = "arbitrary")]
14137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14138        use arbitrary::{Arbitrary, Unstructured};
14139        let mut buf = [0u8; 1024];
14140        rng.fill_bytes(&mut buf);
14141        let mut unstructured = Unstructured::new(&buf);
14142        Self::arbitrary(&mut unstructured).unwrap_or_default()
14143    }
14144}
14145impl Default for GIMBAL_MANAGER_STATUS_DATA {
14146    fn default() -> Self {
14147        Self::DEFAULT.clone()
14148    }
14149}
14150impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14151    type Message = MavMessage;
14152    const ID: u32 = 281u32;
14153    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14154    const EXTRA_CRC: u8 = 48u8;
14155    const ENCODED_LEN: usize = 13usize;
14156    fn deser(
14157        _version: MavlinkVersion,
14158        __input: &[u8],
14159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14160        let avail_len = __input.len();
14161        let mut payload_buf = [0; Self::ENCODED_LEN];
14162        let mut buf = if avail_len < Self::ENCODED_LEN {
14163            payload_buf[0..avail_len].copy_from_slice(__input);
14164            Bytes::new(&payload_buf)
14165        } else {
14166            Bytes::new(__input)
14167        };
14168        let mut __struct = Self::default();
14169        __struct.time_boot_ms = buf.get_u32_le();
14170        let tmp = buf.get_u32_le();
14171        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14172            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14173                flag_type: "GimbalManagerFlags",
14174                value: tmp as u32,
14175            })?;
14176        __struct.gimbal_device_id = buf.get_u8();
14177        __struct.primary_control_sysid = buf.get_u8();
14178        __struct.primary_control_compid = buf.get_u8();
14179        __struct.secondary_control_sysid = buf.get_u8();
14180        __struct.secondary_control_compid = buf.get_u8();
14181        Ok(__struct)
14182    }
14183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14184        let mut __tmp = BytesMut::new(bytes);
14185        #[allow(clippy::absurd_extreme_comparisons)]
14186        #[allow(unused_comparisons)]
14187        if __tmp.remaining() < Self::ENCODED_LEN {
14188            panic!(
14189                "buffer is too small (need {} bytes, but got {})",
14190                Self::ENCODED_LEN,
14191                __tmp.remaining(),
14192            )
14193        }
14194        __tmp.put_u32_le(self.time_boot_ms);
14195        __tmp.put_u32_le(self.flags.bits());
14196        __tmp.put_u8(self.gimbal_device_id);
14197        __tmp.put_u8(self.primary_control_sysid);
14198        __tmp.put_u8(self.primary_control_compid);
14199        __tmp.put_u8(self.secondary_control_sysid);
14200        __tmp.put_u8(self.secondary_control_compid);
14201        if matches!(version, MavlinkVersion::V2) {
14202            let len = __tmp.len();
14203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14204        } else {
14205            __tmp.len()
14206        }
14207    }
14208}
14209#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14210#[doc = ""]
14211#[doc = "ID: 33"]
14212#[derive(Debug, Clone, PartialEq)]
14213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14215#[cfg_attr(feature = "ts", derive(TS))]
14216#[cfg_attr(feature = "ts", ts(export))]
14217pub struct GLOBAL_POSITION_INT_DATA {
14218    #[doc = "Timestamp (time since system boot)."]
14219    pub time_boot_ms: u32,
14220    #[doc = "Latitude, expressed"]
14221    pub lat: i32,
14222    #[doc = "Longitude, expressed"]
14223    pub lon: i32,
14224    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14225    pub alt: i32,
14226    #[doc = "Altitude above home"]
14227    pub relative_alt: i32,
14228    #[doc = "Ground X Speed (Latitude, positive north)"]
14229    pub vx: i16,
14230    #[doc = "Ground Y Speed (Longitude, positive east)"]
14231    pub vy: i16,
14232    #[doc = "Ground Z Speed (Altitude, positive down)"]
14233    pub vz: i16,
14234    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14235    pub hdg: u16,
14236}
14237impl GLOBAL_POSITION_INT_DATA {
14238    pub const ENCODED_LEN: usize = 28usize;
14239    pub const DEFAULT: Self = Self {
14240        time_boot_ms: 0_u32,
14241        lat: 0_i32,
14242        lon: 0_i32,
14243        alt: 0_i32,
14244        relative_alt: 0_i32,
14245        vx: 0_i16,
14246        vy: 0_i16,
14247        vz: 0_i16,
14248        hdg: 0_u16,
14249    };
14250    #[cfg(feature = "arbitrary")]
14251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14252        use arbitrary::{Arbitrary, Unstructured};
14253        let mut buf = [0u8; 1024];
14254        rng.fill_bytes(&mut buf);
14255        let mut unstructured = Unstructured::new(&buf);
14256        Self::arbitrary(&mut unstructured).unwrap_or_default()
14257    }
14258}
14259impl Default for GLOBAL_POSITION_INT_DATA {
14260    fn default() -> Self {
14261        Self::DEFAULT.clone()
14262    }
14263}
14264impl MessageData for GLOBAL_POSITION_INT_DATA {
14265    type Message = MavMessage;
14266    const ID: u32 = 33u32;
14267    const NAME: &'static str = "GLOBAL_POSITION_INT";
14268    const EXTRA_CRC: u8 = 104u8;
14269    const ENCODED_LEN: usize = 28usize;
14270    fn deser(
14271        _version: MavlinkVersion,
14272        __input: &[u8],
14273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14274        let avail_len = __input.len();
14275        let mut payload_buf = [0; Self::ENCODED_LEN];
14276        let mut buf = if avail_len < Self::ENCODED_LEN {
14277            payload_buf[0..avail_len].copy_from_slice(__input);
14278            Bytes::new(&payload_buf)
14279        } else {
14280            Bytes::new(__input)
14281        };
14282        let mut __struct = Self::default();
14283        __struct.time_boot_ms = buf.get_u32_le();
14284        __struct.lat = buf.get_i32_le();
14285        __struct.lon = buf.get_i32_le();
14286        __struct.alt = buf.get_i32_le();
14287        __struct.relative_alt = buf.get_i32_le();
14288        __struct.vx = buf.get_i16_le();
14289        __struct.vy = buf.get_i16_le();
14290        __struct.vz = buf.get_i16_le();
14291        __struct.hdg = buf.get_u16_le();
14292        Ok(__struct)
14293    }
14294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14295        let mut __tmp = BytesMut::new(bytes);
14296        #[allow(clippy::absurd_extreme_comparisons)]
14297        #[allow(unused_comparisons)]
14298        if __tmp.remaining() < Self::ENCODED_LEN {
14299            panic!(
14300                "buffer is too small (need {} bytes, but got {})",
14301                Self::ENCODED_LEN,
14302                __tmp.remaining(),
14303            )
14304        }
14305        __tmp.put_u32_le(self.time_boot_ms);
14306        __tmp.put_i32_le(self.lat);
14307        __tmp.put_i32_le(self.lon);
14308        __tmp.put_i32_le(self.alt);
14309        __tmp.put_i32_le(self.relative_alt);
14310        __tmp.put_i16_le(self.vx);
14311        __tmp.put_i16_le(self.vy);
14312        __tmp.put_i16_le(self.vz);
14313        __tmp.put_u16_le(self.hdg);
14314        if matches!(version, MavlinkVersion::V2) {
14315            let len = __tmp.len();
14316            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14317        } else {
14318            __tmp.len()
14319        }
14320    }
14321}
14322#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14323#[doc = ""]
14324#[doc = "ID: 63"]
14325#[derive(Debug, Clone, PartialEq)]
14326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14328#[cfg_attr(feature = "ts", derive(TS))]
14329#[cfg_attr(feature = "ts", ts(export))]
14330pub struct GLOBAL_POSITION_INT_COV_DATA {
14331    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14332    pub time_usec: u64,
14333    #[doc = "Latitude"]
14334    pub lat: i32,
14335    #[doc = "Longitude"]
14336    pub lon: i32,
14337    #[doc = "Altitude in meters above MSL"]
14338    pub alt: i32,
14339    #[doc = "Altitude above ground"]
14340    pub relative_alt: i32,
14341    #[doc = "Ground X Speed (Latitude)"]
14342    pub vx: f32,
14343    #[doc = "Ground Y Speed (Longitude)"]
14344    pub vy: f32,
14345    #[doc = "Ground Z Speed (Altitude)"]
14346    pub vz: f32,
14347    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14348    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14349    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14350    pub covariance: [f32; 36],
14351    #[doc = "Class id of the estimator this estimate originated from."]
14352    pub estimator_type: MavEstimatorType,
14353}
14354impl GLOBAL_POSITION_INT_COV_DATA {
14355    pub const ENCODED_LEN: usize = 181usize;
14356    pub const DEFAULT: Self = Self {
14357        time_usec: 0_u64,
14358        lat: 0_i32,
14359        lon: 0_i32,
14360        alt: 0_i32,
14361        relative_alt: 0_i32,
14362        vx: 0.0_f32,
14363        vy: 0.0_f32,
14364        vz: 0.0_f32,
14365        covariance: [0.0_f32; 36usize],
14366        estimator_type: MavEstimatorType::DEFAULT,
14367    };
14368    #[cfg(feature = "arbitrary")]
14369    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14370        use arbitrary::{Arbitrary, Unstructured};
14371        let mut buf = [0u8; 1024];
14372        rng.fill_bytes(&mut buf);
14373        let mut unstructured = Unstructured::new(&buf);
14374        Self::arbitrary(&mut unstructured).unwrap_or_default()
14375    }
14376}
14377impl Default for GLOBAL_POSITION_INT_COV_DATA {
14378    fn default() -> Self {
14379        Self::DEFAULT.clone()
14380    }
14381}
14382impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14383    type Message = MavMessage;
14384    const ID: u32 = 63u32;
14385    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14386    const EXTRA_CRC: u8 = 119u8;
14387    const ENCODED_LEN: usize = 181usize;
14388    fn deser(
14389        _version: MavlinkVersion,
14390        __input: &[u8],
14391    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14392        let avail_len = __input.len();
14393        let mut payload_buf = [0; Self::ENCODED_LEN];
14394        let mut buf = if avail_len < Self::ENCODED_LEN {
14395            payload_buf[0..avail_len].copy_from_slice(__input);
14396            Bytes::new(&payload_buf)
14397        } else {
14398            Bytes::new(__input)
14399        };
14400        let mut __struct = Self::default();
14401        __struct.time_usec = buf.get_u64_le();
14402        __struct.lat = buf.get_i32_le();
14403        __struct.lon = buf.get_i32_le();
14404        __struct.alt = buf.get_i32_le();
14405        __struct.relative_alt = buf.get_i32_le();
14406        __struct.vx = buf.get_f32_le();
14407        __struct.vy = buf.get_f32_le();
14408        __struct.vz = buf.get_f32_le();
14409        for v in &mut __struct.covariance {
14410            let val = buf.get_f32_le();
14411            *v = val;
14412        }
14413        let tmp = buf.get_u8();
14414        __struct.estimator_type =
14415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14416                enum_type: "MavEstimatorType",
14417                value: tmp as u32,
14418            })?;
14419        Ok(__struct)
14420    }
14421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14422        let mut __tmp = BytesMut::new(bytes);
14423        #[allow(clippy::absurd_extreme_comparisons)]
14424        #[allow(unused_comparisons)]
14425        if __tmp.remaining() < Self::ENCODED_LEN {
14426            panic!(
14427                "buffer is too small (need {} bytes, but got {})",
14428                Self::ENCODED_LEN,
14429                __tmp.remaining(),
14430            )
14431        }
14432        __tmp.put_u64_le(self.time_usec);
14433        __tmp.put_i32_le(self.lat);
14434        __tmp.put_i32_le(self.lon);
14435        __tmp.put_i32_le(self.alt);
14436        __tmp.put_i32_le(self.relative_alt);
14437        __tmp.put_f32_le(self.vx);
14438        __tmp.put_f32_le(self.vy);
14439        __tmp.put_f32_le(self.vz);
14440        for val in &self.covariance {
14441            __tmp.put_f32_le(*val);
14442        }
14443        __tmp.put_u8(self.estimator_type as u8);
14444        if matches!(version, MavlinkVersion::V2) {
14445            let len = __tmp.len();
14446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14447        } else {
14448            __tmp.len()
14449        }
14450    }
14451}
14452#[doc = "Global position/attitude estimate from a vision source."]
14453#[doc = ""]
14454#[doc = "ID: 101"]
14455#[derive(Debug, Clone, PartialEq)]
14456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14458#[cfg_attr(feature = "ts", derive(TS))]
14459#[cfg_attr(feature = "ts", ts(export))]
14460pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14461    #[doc = "Timestamp (UNIX time or since system boot)"]
14462    pub usec: u64,
14463    #[doc = "Global X position"]
14464    pub x: f32,
14465    #[doc = "Global Y position"]
14466    pub y: f32,
14467    #[doc = "Global Z position"]
14468    pub z: f32,
14469    #[doc = "Roll angle"]
14470    pub roll: f32,
14471    #[doc = "Pitch angle"]
14472    pub pitch: f32,
14473    #[doc = "Yaw angle"]
14474    pub yaw: f32,
14475    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14476    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14479    pub covariance: [f32; 21],
14480    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14482    pub reset_counter: u8,
14483}
14484impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14485    pub const ENCODED_LEN: usize = 117usize;
14486    pub const DEFAULT: Self = Self {
14487        usec: 0_u64,
14488        x: 0.0_f32,
14489        y: 0.0_f32,
14490        z: 0.0_f32,
14491        roll: 0.0_f32,
14492        pitch: 0.0_f32,
14493        yaw: 0.0_f32,
14494        covariance: [0.0_f32; 21usize],
14495        reset_counter: 0_u8,
14496    };
14497    #[cfg(feature = "arbitrary")]
14498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14499        use arbitrary::{Arbitrary, Unstructured};
14500        let mut buf = [0u8; 1024];
14501        rng.fill_bytes(&mut buf);
14502        let mut unstructured = Unstructured::new(&buf);
14503        Self::arbitrary(&mut unstructured).unwrap_or_default()
14504    }
14505}
14506impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14507    fn default() -> Self {
14508        Self::DEFAULT.clone()
14509    }
14510}
14511impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14512    type Message = MavMessage;
14513    const ID: u32 = 101u32;
14514    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14515    const EXTRA_CRC: u8 = 102u8;
14516    const ENCODED_LEN: usize = 117usize;
14517    fn deser(
14518        _version: MavlinkVersion,
14519        __input: &[u8],
14520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14521        let avail_len = __input.len();
14522        let mut payload_buf = [0; Self::ENCODED_LEN];
14523        let mut buf = if avail_len < Self::ENCODED_LEN {
14524            payload_buf[0..avail_len].copy_from_slice(__input);
14525            Bytes::new(&payload_buf)
14526        } else {
14527            Bytes::new(__input)
14528        };
14529        let mut __struct = Self::default();
14530        __struct.usec = buf.get_u64_le();
14531        __struct.x = buf.get_f32_le();
14532        __struct.y = buf.get_f32_le();
14533        __struct.z = buf.get_f32_le();
14534        __struct.roll = buf.get_f32_le();
14535        __struct.pitch = buf.get_f32_le();
14536        __struct.yaw = buf.get_f32_le();
14537        for v in &mut __struct.covariance {
14538            let val = buf.get_f32_le();
14539            *v = val;
14540        }
14541        __struct.reset_counter = buf.get_u8();
14542        Ok(__struct)
14543    }
14544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14545        let mut __tmp = BytesMut::new(bytes);
14546        #[allow(clippy::absurd_extreme_comparisons)]
14547        #[allow(unused_comparisons)]
14548        if __tmp.remaining() < Self::ENCODED_LEN {
14549            panic!(
14550                "buffer is too small (need {} bytes, but got {})",
14551                Self::ENCODED_LEN,
14552                __tmp.remaining(),
14553            )
14554        }
14555        __tmp.put_u64_le(self.usec);
14556        __tmp.put_f32_le(self.x);
14557        __tmp.put_f32_le(self.y);
14558        __tmp.put_f32_le(self.z);
14559        __tmp.put_f32_le(self.roll);
14560        __tmp.put_f32_le(self.pitch);
14561        __tmp.put_f32_le(self.yaw);
14562        if matches!(version, MavlinkVersion::V2) {
14563            for val in &self.covariance {
14564                __tmp.put_f32_le(*val);
14565            }
14566            __tmp.put_u8(self.reset_counter);
14567            let len = __tmp.len();
14568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14569        } else {
14570            __tmp.len()
14571        }
14572    }
14573}
14574#[doc = "Second GPS data."]
14575#[doc = ""]
14576#[doc = "ID: 124"]
14577#[derive(Debug, Clone, PartialEq)]
14578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14580#[cfg_attr(feature = "ts", derive(TS))]
14581#[cfg_attr(feature = "ts", ts(export))]
14582pub struct GPS2_RAW_DATA {
14583    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14584    pub time_usec: u64,
14585    #[doc = "Latitude (WGS84)"]
14586    pub lat: i32,
14587    #[doc = "Longitude (WGS84)"]
14588    pub lon: i32,
14589    #[doc = "Altitude (MSL). Positive for up."]
14590    pub alt: i32,
14591    #[doc = "Age of DGPS info"]
14592    pub dgps_age: u32,
14593    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14594    pub eph: u16,
14595    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14596    pub epv: u16,
14597    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14598    pub vel: u16,
14599    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14600    pub cog: u16,
14601    #[doc = "GPS fix type."]
14602    pub fix_type: GpsFixType,
14603    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14604    pub satellites_visible: u8,
14605    #[doc = "Number of DGPS satellites"]
14606    pub dgps_numch: u8,
14607    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14609    pub yaw: u16,
14610    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14612    pub alt_ellipsoid: i32,
14613    #[doc = "Position uncertainty."]
14614    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14615    pub h_acc: u32,
14616    #[doc = "Altitude uncertainty."]
14617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14618    pub v_acc: u32,
14619    #[doc = "Speed uncertainty."]
14620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14621    pub vel_acc: u32,
14622    #[doc = "Heading / track uncertainty"]
14623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14624    pub hdg_acc: u32,
14625}
14626impl GPS2_RAW_DATA {
14627    pub const ENCODED_LEN: usize = 57usize;
14628    pub const DEFAULT: Self = Self {
14629        time_usec: 0_u64,
14630        lat: 0_i32,
14631        lon: 0_i32,
14632        alt: 0_i32,
14633        dgps_age: 0_u32,
14634        eph: 0_u16,
14635        epv: 0_u16,
14636        vel: 0_u16,
14637        cog: 0_u16,
14638        fix_type: GpsFixType::DEFAULT,
14639        satellites_visible: 0_u8,
14640        dgps_numch: 0_u8,
14641        yaw: 0_u16,
14642        alt_ellipsoid: 0_i32,
14643        h_acc: 0_u32,
14644        v_acc: 0_u32,
14645        vel_acc: 0_u32,
14646        hdg_acc: 0_u32,
14647    };
14648    #[cfg(feature = "arbitrary")]
14649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14650        use arbitrary::{Arbitrary, Unstructured};
14651        let mut buf = [0u8; 1024];
14652        rng.fill_bytes(&mut buf);
14653        let mut unstructured = Unstructured::new(&buf);
14654        Self::arbitrary(&mut unstructured).unwrap_or_default()
14655    }
14656}
14657impl Default for GPS2_RAW_DATA {
14658    fn default() -> Self {
14659        Self::DEFAULT.clone()
14660    }
14661}
14662impl MessageData for GPS2_RAW_DATA {
14663    type Message = MavMessage;
14664    const ID: u32 = 124u32;
14665    const NAME: &'static str = "GPS2_RAW";
14666    const EXTRA_CRC: u8 = 87u8;
14667    const ENCODED_LEN: usize = 57usize;
14668    fn deser(
14669        _version: MavlinkVersion,
14670        __input: &[u8],
14671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14672        let avail_len = __input.len();
14673        let mut payload_buf = [0; Self::ENCODED_LEN];
14674        let mut buf = if avail_len < Self::ENCODED_LEN {
14675            payload_buf[0..avail_len].copy_from_slice(__input);
14676            Bytes::new(&payload_buf)
14677        } else {
14678            Bytes::new(__input)
14679        };
14680        let mut __struct = Self::default();
14681        __struct.time_usec = buf.get_u64_le();
14682        __struct.lat = buf.get_i32_le();
14683        __struct.lon = buf.get_i32_le();
14684        __struct.alt = buf.get_i32_le();
14685        __struct.dgps_age = buf.get_u32_le();
14686        __struct.eph = buf.get_u16_le();
14687        __struct.epv = buf.get_u16_le();
14688        __struct.vel = buf.get_u16_le();
14689        __struct.cog = buf.get_u16_le();
14690        let tmp = buf.get_u8();
14691        __struct.fix_type =
14692            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14693                enum_type: "GpsFixType",
14694                value: tmp as u32,
14695            })?;
14696        __struct.satellites_visible = buf.get_u8();
14697        __struct.dgps_numch = buf.get_u8();
14698        __struct.yaw = buf.get_u16_le();
14699        __struct.alt_ellipsoid = buf.get_i32_le();
14700        __struct.h_acc = buf.get_u32_le();
14701        __struct.v_acc = buf.get_u32_le();
14702        __struct.vel_acc = buf.get_u32_le();
14703        __struct.hdg_acc = buf.get_u32_le();
14704        Ok(__struct)
14705    }
14706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14707        let mut __tmp = BytesMut::new(bytes);
14708        #[allow(clippy::absurd_extreme_comparisons)]
14709        #[allow(unused_comparisons)]
14710        if __tmp.remaining() < Self::ENCODED_LEN {
14711            panic!(
14712                "buffer is too small (need {} bytes, but got {})",
14713                Self::ENCODED_LEN,
14714                __tmp.remaining(),
14715            )
14716        }
14717        __tmp.put_u64_le(self.time_usec);
14718        __tmp.put_i32_le(self.lat);
14719        __tmp.put_i32_le(self.lon);
14720        __tmp.put_i32_le(self.alt);
14721        __tmp.put_u32_le(self.dgps_age);
14722        __tmp.put_u16_le(self.eph);
14723        __tmp.put_u16_le(self.epv);
14724        __tmp.put_u16_le(self.vel);
14725        __tmp.put_u16_le(self.cog);
14726        __tmp.put_u8(self.fix_type as u8);
14727        __tmp.put_u8(self.satellites_visible);
14728        __tmp.put_u8(self.dgps_numch);
14729        if matches!(version, MavlinkVersion::V2) {
14730            __tmp.put_u16_le(self.yaw);
14731            __tmp.put_i32_le(self.alt_ellipsoid);
14732            __tmp.put_u32_le(self.h_acc);
14733            __tmp.put_u32_le(self.v_acc);
14734            __tmp.put_u32_le(self.vel_acc);
14735            __tmp.put_u32_le(self.hdg_acc);
14736            let len = __tmp.len();
14737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14738        } else {
14739            __tmp.len()
14740        }
14741    }
14742}
14743#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14744#[doc = ""]
14745#[doc = "ID: 128"]
14746#[derive(Debug, Clone, PartialEq)]
14747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14749#[cfg_attr(feature = "ts", derive(TS))]
14750#[cfg_attr(feature = "ts", ts(export))]
14751pub struct GPS2_RTK_DATA {
14752    #[doc = "Time since boot of last baseline message received."]
14753    pub time_last_baseline_ms: u32,
14754    #[doc = "GPS Time of Week of last baseline"]
14755    pub tow: u32,
14756    #[doc = "Current baseline in ECEF x or NED north component."]
14757    pub baseline_a_mm: i32,
14758    #[doc = "Current baseline in ECEF y or NED east component."]
14759    pub baseline_b_mm: i32,
14760    #[doc = "Current baseline in ECEF z or NED down component."]
14761    pub baseline_c_mm: i32,
14762    #[doc = "Current estimate of baseline accuracy."]
14763    pub accuracy: u32,
14764    #[doc = "Current number of integer ambiguity hypotheses."]
14765    pub iar_num_hypotheses: i32,
14766    #[doc = "GPS Week Number of last baseline"]
14767    pub wn: u16,
14768    #[doc = "Identification of connected RTK receiver."]
14769    pub rtk_receiver_id: u8,
14770    #[doc = "GPS-specific health report for RTK data."]
14771    pub rtk_health: u8,
14772    #[doc = "Rate of baseline messages being received by GPS"]
14773    pub rtk_rate: u8,
14774    #[doc = "Current number of sats used for RTK calculation."]
14775    pub nsats: u8,
14776    #[doc = "Coordinate system of baseline"]
14777    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14778}
14779impl GPS2_RTK_DATA {
14780    pub const ENCODED_LEN: usize = 35usize;
14781    pub const DEFAULT: Self = Self {
14782        time_last_baseline_ms: 0_u32,
14783        tow: 0_u32,
14784        baseline_a_mm: 0_i32,
14785        baseline_b_mm: 0_i32,
14786        baseline_c_mm: 0_i32,
14787        accuracy: 0_u32,
14788        iar_num_hypotheses: 0_i32,
14789        wn: 0_u16,
14790        rtk_receiver_id: 0_u8,
14791        rtk_health: 0_u8,
14792        rtk_rate: 0_u8,
14793        nsats: 0_u8,
14794        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14795    };
14796    #[cfg(feature = "arbitrary")]
14797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14798        use arbitrary::{Arbitrary, Unstructured};
14799        let mut buf = [0u8; 1024];
14800        rng.fill_bytes(&mut buf);
14801        let mut unstructured = Unstructured::new(&buf);
14802        Self::arbitrary(&mut unstructured).unwrap_or_default()
14803    }
14804}
14805impl Default for GPS2_RTK_DATA {
14806    fn default() -> Self {
14807        Self::DEFAULT.clone()
14808    }
14809}
14810impl MessageData for GPS2_RTK_DATA {
14811    type Message = MavMessage;
14812    const ID: u32 = 128u32;
14813    const NAME: &'static str = "GPS2_RTK";
14814    const EXTRA_CRC: u8 = 226u8;
14815    const ENCODED_LEN: usize = 35usize;
14816    fn deser(
14817        _version: MavlinkVersion,
14818        __input: &[u8],
14819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14820        let avail_len = __input.len();
14821        let mut payload_buf = [0; Self::ENCODED_LEN];
14822        let mut buf = if avail_len < Self::ENCODED_LEN {
14823            payload_buf[0..avail_len].copy_from_slice(__input);
14824            Bytes::new(&payload_buf)
14825        } else {
14826            Bytes::new(__input)
14827        };
14828        let mut __struct = Self::default();
14829        __struct.time_last_baseline_ms = buf.get_u32_le();
14830        __struct.tow = buf.get_u32_le();
14831        __struct.baseline_a_mm = buf.get_i32_le();
14832        __struct.baseline_b_mm = buf.get_i32_le();
14833        __struct.baseline_c_mm = buf.get_i32_le();
14834        __struct.accuracy = buf.get_u32_le();
14835        __struct.iar_num_hypotheses = buf.get_i32_le();
14836        __struct.wn = buf.get_u16_le();
14837        __struct.rtk_receiver_id = buf.get_u8();
14838        __struct.rtk_health = buf.get_u8();
14839        __struct.rtk_rate = buf.get_u8();
14840        __struct.nsats = buf.get_u8();
14841        let tmp = buf.get_u8();
14842        __struct.baseline_coords_type =
14843            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14844                enum_type: "RtkBaselineCoordinateSystem",
14845                value: tmp as u32,
14846            })?;
14847        Ok(__struct)
14848    }
14849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14850        let mut __tmp = BytesMut::new(bytes);
14851        #[allow(clippy::absurd_extreme_comparisons)]
14852        #[allow(unused_comparisons)]
14853        if __tmp.remaining() < Self::ENCODED_LEN {
14854            panic!(
14855                "buffer is too small (need {} bytes, but got {})",
14856                Self::ENCODED_LEN,
14857                __tmp.remaining(),
14858            )
14859        }
14860        __tmp.put_u32_le(self.time_last_baseline_ms);
14861        __tmp.put_u32_le(self.tow);
14862        __tmp.put_i32_le(self.baseline_a_mm);
14863        __tmp.put_i32_le(self.baseline_b_mm);
14864        __tmp.put_i32_le(self.baseline_c_mm);
14865        __tmp.put_u32_le(self.accuracy);
14866        __tmp.put_i32_le(self.iar_num_hypotheses);
14867        __tmp.put_u16_le(self.wn);
14868        __tmp.put_u8(self.rtk_receiver_id);
14869        __tmp.put_u8(self.rtk_health);
14870        __tmp.put_u8(self.rtk_rate);
14871        __tmp.put_u8(self.nsats);
14872        __tmp.put_u8(self.baseline_coords_type as u8);
14873        if matches!(version, MavlinkVersion::V2) {
14874            let len = __tmp.len();
14875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14876        } else {
14877            __tmp.len()
14878        }
14879    }
14880}
14881#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14882#[doc = ""]
14883#[doc = "ID: 49"]
14884#[derive(Debug, Clone, PartialEq)]
14885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14887#[cfg_attr(feature = "ts", derive(TS))]
14888#[cfg_attr(feature = "ts", ts(export))]
14889pub struct GPS_GLOBAL_ORIGIN_DATA {
14890    #[doc = "Latitude (WGS84)"]
14891    pub latitude: i32,
14892    #[doc = "Longitude (WGS84)"]
14893    pub longitude: i32,
14894    #[doc = "Altitude (MSL). Positive for up."]
14895    pub altitude: i32,
14896    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14897    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14898    pub time_usec: u64,
14899}
14900impl GPS_GLOBAL_ORIGIN_DATA {
14901    pub const ENCODED_LEN: usize = 20usize;
14902    pub const DEFAULT: Self = Self {
14903        latitude: 0_i32,
14904        longitude: 0_i32,
14905        altitude: 0_i32,
14906        time_usec: 0_u64,
14907    };
14908    #[cfg(feature = "arbitrary")]
14909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14910        use arbitrary::{Arbitrary, Unstructured};
14911        let mut buf = [0u8; 1024];
14912        rng.fill_bytes(&mut buf);
14913        let mut unstructured = Unstructured::new(&buf);
14914        Self::arbitrary(&mut unstructured).unwrap_or_default()
14915    }
14916}
14917impl Default for GPS_GLOBAL_ORIGIN_DATA {
14918    fn default() -> Self {
14919        Self::DEFAULT.clone()
14920    }
14921}
14922impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14923    type Message = MavMessage;
14924    const ID: u32 = 49u32;
14925    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14926    const EXTRA_CRC: u8 = 39u8;
14927    const ENCODED_LEN: usize = 20usize;
14928    fn deser(
14929        _version: MavlinkVersion,
14930        __input: &[u8],
14931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14932        let avail_len = __input.len();
14933        let mut payload_buf = [0; Self::ENCODED_LEN];
14934        let mut buf = if avail_len < Self::ENCODED_LEN {
14935            payload_buf[0..avail_len].copy_from_slice(__input);
14936            Bytes::new(&payload_buf)
14937        } else {
14938            Bytes::new(__input)
14939        };
14940        let mut __struct = Self::default();
14941        __struct.latitude = buf.get_i32_le();
14942        __struct.longitude = buf.get_i32_le();
14943        __struct.altitude = buf.get_i32_le();
14944        __struct.time_usec = buf.get_u64_le();
14945        Ok(__struct)
14946    }
14947    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14948        let mut __tmp = BytesMut::new(bytes);
14949        #[allow(clippy::absurd_extreme_comparisons)]
14950        #[allow(unused_comparisons)]
14951        if __tmp.remaining() < Self::ENCODED_LEN {
14952            panic!(
14953                "buffer is too small (need {} bytes, but got {})",
14954                Self::ENCODED_LEN,
14955                __tmp.remaining(),
14956            )
14957        }
14958        __tmp.put_i32_le(self.latitude);
14959        __tmp.put_i32_le(self.longitude);
14960        __tmp.put_i32_le(self.altitude);
14961        if matches!(version, MavlinkVersion::V2) {
14962            __tmp.put_u64_le(self.time_usec);
14963            let len = __tmp.len();
14964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14965        } else {
14966            __tmp.len()
14967        }
14968    }
14969}
14970#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14971#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14972#[doc = ""]
14973#[doc = "ID: 123"]
14974#[derive(Debug, Clone, PartialEq)]
14975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14977#[cfg_attr(feature = "ts", derive(TS))]
14978#[cfg_attr(feature = "ts", ts(export))]
14979pub struct GPS_INJECT_DATA_DATA {
14980    #[doc = "System ID"]
14981    pub target_system: u8,
14982    #[doc = "Component ID"]
14983    pub target_component: u8,
14984    #[doc = "Data length"]
14985    pub len: u8,
14986    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14988    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14989    pub data: [u8; 110],
14990}
14991impl GPS_INJECT_DATA_DATA {
14992    pub const ENCODED_LEN: usize = 113usize;
14993    pub const DEFAULT: Self = Self {
14994        target_system: 0_u8,
14995        target_component: 0_u8,
14996        len: 0_u8,
14997        data: [0_u8; 110usize],
14998    };
14999    #[cfg(feature = "arbitrary")]
15000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15001        use arbitrary::{Arbitrary, Unstructured};
15002        let mut buf = [0u8; 1024];
15003        rng.fill_bytes(&mut buf);
15004        let mut unstructured = Unstructured::new(&buf);
15005        Self::arbitrary(&mut unstructured).unwrap_or_default()
15006    }
15007}
15008impl Default for GPS_INJECT_DATA_DATA {
15009    fn default() -> Self {
15010        Self::DEFAULT.clone()
15011    }
15012}
15013impl MessageData for GPS_INJECT_DATA_DATA {
15014    type Message = MavMessage;
15015    const ID: u32 = 123u32;
15016    const NAME: &'static str = "GPS_INJECT_DATA";
15017    const EXTRA_CRC: u8 = 250u8;
15018    const ENCODED_LEN: usize = 113usize;
15019    fn deser(
15020        _version: MavlinkVersion,
15021        __input: &[u8],
15022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15023        let avail_len = __input.len();
15024        let mut payload_buf = [0; Self::ENCODED_LEN];
15025        let mut buf = if avail_len < Self::ENCODED_LEN {
15026            payload_buf[0..avail_len].copy_from_slice(__input);
15027            Bytes::new(&payload_buf)
15028        } else {
15029            Bytes::new(__input)
15030        };
15031        let mut __struct = Self::default();
15032        __struct.target_system = buf.get_u8();
15033        __struct.target_component = buf.get_u8();
15034        __struct.len = buf.get_u8();
15035        for v in &mut __struct.data {
15036            let val = buf.get_u8();
15037            *v = val;
15038        }
15039        Ok(__struct)
15040    }
15041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15042        let mut __tmp = BytesMut::new(bytes);
15043        #[allow(clippy::absurd_extreme_comparisons)]
15044        #[allow(unused_comparisons)]
15045        if __tmp.remaining() < Self::ENCODED_LEN {
15046            panic!(
15047                "buffer is too small (need {} bytes, but got {})",
15048                Self::ENCODED_LEN,
15049                __tmp.remaining(),
15050            )
15051        }
15052        __tmp.put_u8(self.target_system);
15053        __tmp.put_u8(self.target_component);
15054        __tmp.put_u8(self.len);
15055        for val in &self.data {
15056            __tmp.put_u8(*val);
15057        }
15058        if matches!(version, MavlinkVersion::V2) {
15059            let len = __tmp.len();
15060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15061        } else {
15062            __tmp.len()
15063        }
15064    }
15065}
15066#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15067#[doc = ""]
15068#[doc = "ID: 232"]
15069#[derive(Debug, Clone, PartialEq)]
15070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15072#[cfg_attr(feature = "ts", derive(TS))]
15073#[cfg_attr(feature = "ts", ts(export))]
15074pub struct GPS_INPUT_DATA {
15075    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15076    pub time_usec: u64,
15077    #[doc = "GPS time (from start of GPS week)"]
15078    pub time_week_ms: u32,
15079    #[doc = "Latitude (WGS84)"]
15080    pub lat: i32,
15081    #[doc = "Longitude (WGS84)"]
15082    pub lon: i32,
15083    #[doc = "Altitude (MSL). Positive for up."]
15084    pub alt: f32,
15085    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15086    pub hdop: f32,
15087    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15088    pub vdop: f32,
15089    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15090    pub vn: f32,
15091    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15092    pub ve: f32,
15093    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15094    pub vd: f32,
15095    #[doc = "GPS speed accuracy"]
15096    pub speed_accuracy: f32,
15097    #[doc = "GPS horizontal accuracy"]
15098    pub horiz_accuracy: f32,
15099    #[doc = "GPS vertical accuracy"]
15100    pub vert_accuracy: f32,
15101    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15102    pub ignore_flags: GpsInputIgnoreFlags,
15103    #[doc = "GPS week number"]
15104    pub time_week: u16,
15105    #[doc = "ID of the GPS for multiple GPS inputs"]
15106    pub gps_id: u8,
15107    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15108    pub fix_type: u8,
15109    #[doc = "Number of satellites visible."]
15110    pub satellites_visible: u8,
15111    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15113    pub yaw: u16,
15114}
15115impl GPS_INPUT_DATA {
15116    pub const ENCODED_LEN: usize = 65usize;
15117    pub const DEFAULT: Self = Self {
15118        time_usec: 0_u64,
15119        time_week_ms: 0_u32,
15120        lat: 0_i32,
15121        lon: 0_i32,
15122        alt: 0.0_f32,
15123        hdop: 0.0_f32,
15124        vdop: 0.0_f32,
15125        vn: 0.0_f32,
15126        ve: 0.0_f32,
15127        vd: 0.0_f32,
15128        speed_accuracy: 0.0_f32,
15129        horiz_accuracy: 0.0_f32,
15130        vert_accuracy: 0.0_f32,
15131        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15132        time_week: 0_u16,
15133        gps_id: 0_u8,
15134        fix_type: 0_u8,
15135        satellites_visible: 0_u8,
15136        yaw: 0_u16,
15137    };
15138    #[cfg(feature = "arbitrary")]
15139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15140        use arbitrary::{Arbitrary, Unstructured};
15141        let mut buf = [0u8; 1024];
15142        rng.fill_bytes(&mut buf);
15143        let mut unstructured = Unstructured::new(&buf);
15144        Self::arbitrary(&mut unstructured).unwrap_or_default()
15145    }
15146}
15147impl Default for GPS_INPUT_DATA {
15148    fn default() -> Self {
15149        Self::DEFAULT.clone()
15150    }
15151}
15152impl MessageData for GPS_INPUT_DATA {
15153    type Message = MavMessage;
15154    const ID: u32 = 232u32;
15155    const NAME: &'static str = "GPS_INPUT";
15156    const EXTRA_CRC: u8 = 151u8;
15157    const ENCODED_LEN: usize = 65usize;
15158    fn deser(
15159        _version: MavlinkVersion,
15160        __input: &[u8],
15161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15162        let avail_len = __input.len();
15163        let mut payload_buf = [0; Self::ENCODED_LEN];
15164        let mut buf = if avail_len < Self::ENCODED_LEN {
15165            payload_buf[0..avail_len].copy_from_slice(__input);
15166            Bytes::new(&payload_buf)
15167        } else {
15168            Bytes::new(__input)
15169        };
15170        let mut __struct = Self::default();
15171        __struct.time_usec = buf.get_u64_le();
15172        __struct.time_week_ms = buf.get_u32_le();
15173        __struct.lat = buf.get_i32_le();
15174        __struct.lon = buf.get_i32_le();
15175        __struct.alt = buf.get_f32_le();
15176        __struct.hdop = buf.get_f32_le();
15177        __struct.vdop = buf.get_f32_le();
15178        __struct.vn = buf.get_f32_le();
15179        __struct.ve = buf.get_f32_le();
15180        __struct.vd = buf.get_f32_le();
15181        __struct.speed_accuracy = buf.get_f32_le();
15182        __struct.horiz_accuracy = buf.get_f32_le();
15183        __struct.vert_accuracy = buf.get_f32_le();
15184        let tmp = buf.get_u16_le();
15185        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
15186            tmp & GpsInputIgnoreFlags::all().bits(),
15187        )
15188        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15189            flag_type: "GpsInputIgnoreFlags",
15190            value: tmp as u32,
15191        })?;
15192        __struct.time_week = buf.get_u16_le();
15193        __struct.gps_id = buf.get_u8();
15194        __struct.fix_type = buf.get_u8();
15195        __struct.satellites_visible = buf.get_u8();
15196        __struct.yaw = buf.get_u16_le();
15197        Ok(__struct)
15198    }
15199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15200        let mut __tmp = BytesMut::new(bytes);
15201        #[allow(clippy::absurd_extreme_comparisons)]
15202        #[allow(unused_comparisons)]
15203        if __tmp.remaining() < Self::ENCODED_LEN {
15204            panic!(
15205                "buffer is too small (need {} bytes, but got {})",
15206                Self::ENCODED_LEN,
15207                __tmp.remaining(),
15208            )
15209        }
15210        __tmp.put_u64_le(self.time_usec);
15211        __tmp.put_u32_le(self.time_week_ms);
15212        __tmp.put_i32_le(self.lat);
15213        __tmp.put_i32_le(self.lon);
15214        __tmp.put_f32_le(self.alt);
15215        __tmp.put_f32_le(self.hdop);
15216        __tmp.put_f32_le(self.vdop);
15217        __tmp.put_f32_le(self.vn);
15218        __tmp.put_f32_le(self.ve);
15219        __tmp.put_f32_le(self.vd);
15220        __tmp.put_f32_le(self.speed_accuracy);
15221        __tmp.put_f32_le(self.horiz_accuracy);
15222        __tmp.put_f32_le(self.vert_accuracy);
15223        __tmp.put_u16_le(self.ignore_flags.bits());
15224        __tmp.put_u16_le(self.time_week);
15225        __tmp.put_u8(self.gps_id);
15226        __tmp.put_u8(self.fix_type);
15227        __tmp.put_u8(self.satellites_visible);
15228        if matches!(version, MavlinkVersion::V2) {
15229            __tmp.put_u16_le(self.yaw);
15230            let len = __tmp.len();
15231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15232        } else {
15233            __tmp.len()
15234        }
15235    }
15236}
15237#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15238#[doc = ""]
15239#[doc = "ID: 24"]
15240#[derive(Debug, Clone, PartialEq)]
15241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15243#[cfg_attr(feature = "ts", derive(TS))]
15244#[cfg_attr(feature = "ts", ts(export))]
15245pub struct GPS_RAW_INT_DATA {
15246    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15247    pub time_usec: u64,
15248    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15249    pub lat: i32,
15250    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15251    pub lon: i32,
15252    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15253    pub alt: i32,
15254    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15255    pub eph: u16,
15256    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15257    pub epv: u16,
15258    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15259    pub vel: u16,
15260    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15261    pub cog: u16,
15262    #[doc = "GPS fix type."]
15263    pub fix_type: GpsFixType,
15264    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15265    pub satellites_visible: u8,
15266    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15268    pub alt_ellipsoid: i32,
15269    #[doc = "Position uncertainty."]
15270    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15271    pub h_acc: u32,
15272    #[doc = "Altitude uncertainty."]
15273    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15274    pub v_acc: u32,
15275    #[doc = "Speed uncertainty."]
15276    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15277    pub vel_acc: u32,
15278    #[doc = "Heading / track uncertainty"]
15279    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15280    pub hdg_acc: u32,
15281    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15282    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15283    pub yaw: u16,
15284}
15285impl GPS_RAW_INT_DATA {
15286    pub const ENCODED_LEN: usize = 52usize;
15287    pub const DEFAULT: Self = Self {
15288        time_usec: 0_u64,
15289        lat: 0_i32,
15290        lon: 0_i32,
15291        alt: 0_i32,
15292        eph: 0_u16,
15293        epv: 0_u16,
15294        vel: 0_u16,
15295        cog: 0_u16,
15296        fix_type: GpsFixType::DEFAULT,
15297        satellites_visible: 0_u8,
15298        alt_ellipsoid: 0_i32,
15299        h_acc: 0_u32,
15300        v_acc: 0_u32,
15301        vel_acc: 0_u32,
15302        hdg_acc: 0_u32,
15303        yaw: 0_u16,
15304    };
15305    #[cfg(feature = "arbitrary")]
15306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15307        use arbitrary::{Arbitrary, Unstructured};
15308        let mut buf = [0u8; 1024];
15309        rng.fill_bytes(&mut buf);
15310        let mut unstructured = Unstructured::new(&buf);
15311        Self::arbitrary(&mut unstructured).unwrap_or_default()
15312    }
15313}
15314impl Default for GPS_RAW_INT_DATA {
15315    fn default() -> Self {
15316        Self::DEFAULT.clone()
15317    }
15318}
15319impl MessageData for GPS_RAW_INT_DATA {
15320    type Message = MavMessage;
15321    const ID: u32 = 24u32;
15322    const NAME: &'static str = "GPS_RAW_INT";
15323    const EXTRA_CRC: u8 = 24u8;
15324    const ENCODED_LEN: usize = 52usize;
15325    fn deser(
15326        _version: MavlinkVersion,
15327        __input: &[u8],
15328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15329        let avail_len = __input.len();
15330        let mut payload_buf = [0; Self::ENCODED_LEN];
15331        let mut buf = if avail_len < Self::ENCODED_LEN {
15332            payload_buf[0..avail_len].copy_from_slice(__input);
15333            Bytes::new(&payload_buf)
15334        } else {
15335            Bytes::new(__input)
15336        };
15337        let mut __struct = Self::default();
15338        __struct.time_usec = buf.get_u64_le();
15339        __struct.lat = buf.get_i32_le();
15340        __struct.lon = buf.get_i32_le();
15341        __struct.alt = buf.get_i32_le();
15342        __struct.eph = buf.get_u16_le();
15343        __struct.epv = buf.get_u16_le();
15344        __struct.vel = buf.get_u16_le();
15345        __struct.cog = buf.get_u16_le();
15346        let tmp = buf.get_u8();
15347        __struct.fix_type =
15348            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15349                enum_type: "GpsFixType",
15350                value: tmp as u32,
15351            })?;
15352        __struct.satellites_visible = buf.get_u8();
15353        __struct.alt_ellipsoid = buf.get_i32_le();
15354        __struct.h_acc = buf.get_u32_le();
15355        __struct.v_acc = buf.get_u32_le();
15356        __struct.vel_acc = buf.get_u32_le();
15357        __struct.hdg_acc = buf.get_u32_le();
15358        __struct.yaw = buf.get_u16_le();
15359        Ok(__struct)
15360    }
15361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15362        let mut __tmp = BytesMut::new(bytes);
15363        #[allow(clippy::absurd_extreme_comparisons)]
15364        #[allow(unused_comparisons)]
15365        if __tmp.remaining() < Self::ENCODED_LEN {
15366            panic!(
15367                "buffer is too small (need {} bytes, but got {})",
15368                Self::ENCODED_LEN,
15369                __tmp.remaining(),
15370            )
15371        }
15372        __tmp.put_u64_le(self.time_usec);
15373        __tmp.put_i32_le(self.lat);
15374        __tmp.put_i32_le(self.lon);
15375        __tmp.put_i32_le(self.alt);
15376        __tmp.put_u16_le(self.eph);
15377        __tmp.put_u16_le(self.epv);
15378        __tmp.put_u16_le(self.vel);
15379        __tmp.put_u16_le(self.cog);
15380        __tmp.put_u8(self.fix_type as u8);
15381        __tmp.put_u8(self.satellites_visible);
15382        if matches!(version, MavlinkVersion::V2) {
15383            __tmp.put_i32_le(self.alt_ellipsoid);
15384            __tmp.put_u32_le(self.h_acc);
15385            __tmp.put_u32_le(self.v_acc);
15386            __tmp.put_u32_le(self.vel_acc);
15387            __tmp.put_u32_le(self.hdg_acc);
15388            __tmp.put_u16_le(self.yaw);
15389            let len = __tmp.len();
15390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15391        } else {
15392            __tmp.len()
15393        }
15394    }
15395}
15396#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15397#[doc = ""]
15398#[doc = "ID: 233"]
15399#[derive(Debug, Clone, PartialEq)]
15400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15402#[cfg_attr(feature = "ts", derive(TS))]
15403#[cfg_attr(feature = "ts", ts(export))]
15404pub struct GPS_RTCM_DATA_DATA {
15405    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15406    pub flags: u8,
15407    #[doc = "data length"]
15408    pub len: u8,
15409    #[doc = "RTCM message (may be fragmented)"]
15410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15411    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15412    pub data: [u8; 180],
15413}
15414impl GPS_RTCM_DATA_DATA {
15415    pub const ENCODED_LEN: usize = 182usize;
15416    pub const DEFAULT: Self = Self {
15417        flags: 0_u8,
15418        len: 0_u8,
15419        data: [0_u8; 180usize],
15420    };
15421    #[cfg(feature = "arbitrary")]
15422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15423        use arbitrary::{Arbitrary, Unstructured};
15424        let mut buf = [0u8; 1024];
15425        rng.fill_bytes(&mut buf);
15426        let mut unstructured = Unstructured::new(&buf);
15427        Self::arbitrary(&mut unstructured).unwrap_or_default()
15428    }
15429}
15430impl Default for GPS_RTCM_DATA_DATA {
15431    fn default() -> Self {
15432        Self::DEFAULT.clone()
15433    }
15434}
15435impl MessageData for GPS_RTCM_DATA_DATA {
15436    type Message = MavMessage;
15437    const ID: u32 = 233u32;
15438    const NAME: &'static str = "GPS_RTCM_DATA";
15439    const EXTRA_CRC: u8 = 35u8;
15440    const ENCODED_LEN: usize = 182usize;
15441    fn deser(
15442        _version: MavlinkVersion,
15443        __input: &[u8],
15444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15445        let avail_len = __input.len();
15446        let mut payload_buf = [0; Self::ENCODED_LEN];
15447        let mut buf = if avail_len < Self::ENCODED_LEN {
15448            payload_buf[0..avail_len].copy_from_slice(__input);
15449            Bytes::new(&payload_buf)
15450        } else {
15451            Bytes::new(__input)
15452        };
15453        let mut __struct = Self::default();
15454        __struct.flags = buf.get_u8();
15455        __struct.len = buf.get_u8();
15456        for v in &mut __struct.data {
15457            let val = buf.get_u8();
15458            *v = val;
15459        }
15460        Ok(__struct)
15461    }
15462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15463        let mut __tmp = BytesMut::new(bytes);
15464        #[allow(clippy::absurd_extreme_comparisons)]
15465        #[allow(unused_comparisons)]
15466        if __tmp.remaining() < Self::ENCODED_LEN {
15467            panic!(
15468                "buffer is too small (need {} bytes, but got {})",
15469                Self::ENCODED_LEN,
15470                __tmp.remaining(),
15471            )
15472        }
15473        __tmp.put_u8(self.flags);
15474        __tmp.put_u8(self.len);
15475        for val in &self.data {
15476            __tmp.put_u8(*val);
15477        }
15478        if matches!(version, MavlinkVersion::V2) {
15479            let len = __tmp.len();
15480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15481        } else {
15482            __tmp.len()
15483        }
15484    }
15485}
15486#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15487#[doc = ""]
15488#[doc = "ID: 127"]
15489#[derive(Debug, Clone, PartialEq)]
15490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15492#[cfg_attr(feature = "ts", derive(TS))]
15493#[cfg_attr(feature = "ts", ts(export))]
15494pub struct GPS_RTK_DATA {
15495    #[doc = "Time since boot of last baseline message received."]
15496    pub time_last_baseline_ms: u32,
15497    #[doc = "GPS Time of Week of last baseline"]
15498    pub tow: u32,
15499    #[doc = "Current baseline in ECEF x or NED north component."]
15500    pub baseline_a_mm: i32,
15501    #[doc = "Current baseline in ECEF y or NED east component."]
15502    pub baseline_b_mm: i32,
15503    #[doc = "Current baseline in ECEF z or NED down component."]
15504    pub baseline_c_mm: i32,
15505    #[doc = "Current estimate of baseline accuracy."]
15506    pub accuracy: u32,
15507    #[doc = "Current number of integer ambiguity hypotheses."]
15508    pub iar_num_hypotheses: i32,
15509    #[doc = "GPS Week Number of last baseline"]
15510    pub wn: u16,
15511    #[doc = "Identification of connected RTK receiver."]
15512    pub rtk_receiver_id: u8,
15513    #[doc = "GPS-specific health report for RTK data."]
15514    pub rtk_health: u8,
15515    #[doc = "Rate of baseline messages being received by GPS"]
15516    pub rtk_rate: u8,
15517    #[doc = "Current number of sats used for RTK calculation."]
15518    pub nsats: u8,
15519    #[doc = "Coordinate system of baseline"]
15520    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15521}
15522impl GPS_RTK_DATA {
15523    pub const ENCODED_LEN: usize = 35usize;
15524    pub const DEFAULT: Self = Self {
15525        time_last_baseline_ms: 0_u32,
15526        tow: 0_u32,
15527        baseline_a_mm: 0_i32,
15528        baseline_b_mm: 0_i32,
15529        baseline_c_mm: 0_i32,
15530        accuracy: 0_u32,
15531        iar_num_hypotheses: 0_i32,
15532        wn: 0_u16,
15533        rtk_receiver_id: 0_u8,
15534        rtk_health: 0_u8,
15535        rtk_rate: 0_u8,
15536        nsats: 0_u8,
15537        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15538    };
15539    #[cfg(feature = "arbitrary")]
15540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15541        use arbitrary::{Arbitrary, Unstructured};
15542        let mut buf = [0u8; 1024];
15543        rng.fill_bytes(&mut buf);
15544        let mut unstructured = Unstructured::new(&buf);
15545        Self::arbitrary(&mut unstructured).unwrap_or_default()
15546    }
15547}
15548impl Default for GPS_RTK_DATA {
15549    fn default() -> Self {
15550        Self::DEFAULT.clone()
15551    }
15552}
15553impl MessageData for GPS_RTK_DATA {
15554    type Message = MavMessage;
15555    const ID: u32 = 127u32;
15556    const NAME: &'static str = "GPS_RTK";
15557    const EXTRA_CRC: u8 = 25u8;
15558    const ENCODED_LEN: usize = 35usize;
15559    fn deser(
15560        _version: MavlinkVersion,
15561        __input: &[u8],
15562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15563        let avail_len = __input.len();
15564        let mut payload_buf = [0; Self::ENCODED_LEN];
15565        let mut buf = if avail_len < Self::ENCODED_LEN {
15566            payload_buf[0..avail_len].copy_from_slice(__input);
15567            Bytes::new(&payload_buf)
15568        } else {
15569            Bytes::new(__input)
15570        };
15571        let mut __struct = Self::default();
15572        __struct.time_last_baseline_ms = buf.get_u32_le();
15573        __struct.tow = buf.get_u32_le();
15574        __struct.baseline_a_mm = buf.get_i32_le();
15575        __struct.baseline_b_mm = buf.get_i32_le();
15576        __struct.baseline_c_mm = buf.get_i32_le();
15577        __struct.accuracy = buf.get_u32_le();
15578        __struct.iar_num_hypotheses = buf.get_i32_le();
15579        __struct.wn = buf.get_u16_le();
15580        __struct.rtk_receiver_id = buf.get_u8();
15581        __struct.rtk_health = buf.get_u8();
15582        __struct.rtk_rate = buf.get_u8();
15583        __struct.nsats = buf.get_u8();
15584        let tmp = buf.get_u8();
15585        __struct.baseline_coords_type =
15586            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15587                enum_type: "RtkBaselineCoordinateSystem",
15588                value: tmp as u32,
15589            })?;
15590        Ok(__struct)
15591    }
15592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15593        let mut __tmp = BytesMut::new(bytes);
15594        #[allow(clippy::absurd_extreme_comparisons)]
15595        #[allow(unused_comparisons)]
15596        if __tmp.remaining() < Self::ENCODED_LEN {
15597            panic!(
15598                "buffer is too small (need {} bytes, but got {})",
15599                Self::ENCODED_LEN,
15600                __tmp.remaining(),
15601            )
15602        }
15603        __tmp.put_u32_le(self.time_last_baseline_ms);
15604        __tmp.put_u32_le(self.tow);
15605        __tmp.put_i32_le(self.baseline_a_mm);
15606        __tmp.put_i32_le(self.baseline_b_mm);
15607        __tmp.put_i32_le(self.baseline_c_mm);
15608        __tmp.put_u32_le(self.accuracy);
15609        __tmp.put_i32_le(self.iar_num_hypotheses);
15610        __tmp.put_u16_le(self.wn);
15611        __tmp.put_u8(self.rtk_receiver_id);
15612        __tmp.put_u8(self.rtk_health);
15613        __tmp.put_u8(self.rtk_rate);
15614        __tmp.put_u8(self.nsats);
15615        __tmp.put_u8(self.baseline_coords_type as u8);
15616        if matches!(version, MavlinkVersion::V2) {
15617            let len = __tmp.len();
15618            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15619        } else {
15620            __tmp.len()
15621        }
15622    }
15623}
15624#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15625#[doc = ""]
15626#[doc = "ID: 25"]
15627#[derive(Debug, Clone, PartialEq)]
15628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15630#[cfg_attr(feature = "ts", derive(TS))]
15631#[cfg_attr(feature = "ts", ts(export))]
15632pub struct GPS_STATUS_DATA {
15633    #[doc = "Number of satellites visible"]
15634    pub satellites_visible: u8,
15635    #[doc = "Global satellite ID"]
15636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15637    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15638    pub satellite_prn: [u8; 20],
15639    #[doc = "0: Satellite not used, 1: used for localization"]
15640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15641    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15642    pub satellite_used: [u8; 20],
15643    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15644    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15645    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15646    pub satellite_elevation: [u8; 20],
15647    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15649    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15650    pub satellite_azimuth: [u8; 20],
15651    #[doc = "Signal to noise ratio of satellite"]
15652    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15653    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15654    pub satellite_snr: [u8; 20],
15655}
15656impl GPS_STATUS_DATA {
15657    pub const ENCODED_LEN: usize = 101usize;
15658    pub const DEFAULT: Self = Self {
15659        satellites_visible: 0_u8,
15660        satellite_prn: [0_u8; 20usize],
15661        satellite_used: [0_u8; 20usize],
15662        satellite_elevation: [0_u8; 20usize],
15663        satellite_azimuth: [0_u8; 20usize],
15664        satellite_snr: [0_u8; 20usize],
15665    };
15666    #[cfg(feature = "arbitrary")]
15667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15668        use arbitrary::{Arbitrary, Unstructured};
15669        let mut buf = [0u8; 1024];
15670        rng.fill_bytes(&mut buf);
15671        let mut unstructured = Unstructured::new(&buf);
15672        Self::arbitrary(&mut unstructured).unwrap_or_default()
15673    }
15674}
15675impl Default for GPS_STATUS_DATA {
15676    fn default() -> Self {
15677        Self::DEFAULT.clone()
15678    }
15679}
15680impl MessageData for GPS_STATUS_DATA {
15681    type Message = MavMessage;
15682    const ID: u32 = 25u32;
15683    const NAME: &'static str = "GPS_STATUS";
15684    const EXTRA_CRC: u8 = 23u8;
15685    const ENCODED_LEN: usize = 101usize;
15686    fn deser(
15687        _version: MavlinkVersion,
15688        __input: &[u8],
15689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15690        let avail_len = __input.len();
15691        let mut payload_buf = [0; Self::ENCODED_LEN];
15692        let mut buf = if avail_len < Self::ENCODED_LEN {
15693            payload_buf[0..avail_len].copy_from_slice(__input);
15694            Bytes::new(&payload_buf)
15695        } else {
15696            Bytes::new(__input)
15697        };
15698        let mut __struct = Self::default();
15699        __struct.satellites_visible = buf.get_u8();
15700        for v in &mut __struct.satellite_prn {
15701            let val = buf.get_u8();
15702            *v = val;
15703        }
15704        for v in &mut __struct.satellite_used {
15705            let val = buf.get_u8();
15706            *v = val;
15707        }
15708        for v in &mut __struct.satellite_elevation {
15709            let val = buf.get_u8();
15710            *v = val;
15711        }
15712        for v in &mut __struct.satellite_azimuth {
15713            let val = buf.get_u8();
15714            *v = val;
15715        }
15716        for v in &mut __struct.satellite_snr {
15717            let val = buf.get_u8();
15718            *v = val;
15719        }
15720        Ok(__struct)
15721    }
15722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15723        let mut __tmp = BytesMut::new(bytes);
15724        #[allow(clippy::absurd_extreme_comparisons)]
15725        #[allow(unused_comparisons)]
15726        if __tmp.remaining() < Self::ENCODED_LEN {
15727            panic!(
15728                "buffer is too small (need {} bytes, but got {})",
15729                Self::ENCODED_LEN,
15730                __tmp.remaining(),
15731            )
15732        }
15733        __tmp.put_u8(self.satellites_visible);
15734        for val in &self.satellite_prn {
15735            __tmp.put_u8(*val);
15736        }
15737        for val in &self.satellite_used {
15738            __tmp.put_u8(*val);
15739        }
15740        for val in &self.satellite_elevation {
15741            __tmp.put_u8(*val);
15742        }
15743        for val in &self.satellite_azimuth {
15744            __tmp.put_u8(*val);
15745        }
15746        for val in &self.satellite_snr {
15747            __tmp.put_u8(*val);
15748        }
15749        if matches!(version, MavlinkVersion::V2) {
15750            let len = __tmp.len();
15751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15752        } else {
15753            __tmp.len()
15754        }
15755    }
15756}
15757#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15758#[doc = ""]
15759#[doc = "ID: 0"]
15760#[derive(Debug, Clone, PartialEq)]
15761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15763#[cfg_attr(feature = "ts", derive(TS))]
15764#[cfg_attr(feature = "ts", ts(export))]
15765pub struct HEARTBEAT_DATA {
15766    #[doc = "A bitfield for use for autopilot-specific flags"]
15767    pub custom_mode: u32,
15768    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15769    pub mavtype: MavType,
15770    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15771    pub autopilot: MavAutopilot,
15772    #[doc = "System mode bitmap."]
15773    pub base_mode: MavModeFlag,
15774    #[doc = "System status flag."]
15775    pub system_status: MavState,
15776    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15777    pub mavlink_version: u8,
15778}
15779impl HEARTBEAT_DATA {
15780    pub const ENCODED_LEN: usize = 9usize;
15781    pub const DEFAULT: Self = Self {
15782        custom_mode: 0_u32,
15783        mavtype: MavType::DEFAULT,
15784        autopilot: MavAutopilot::DEFAULT,
15785        base_mode: MavModeFlag::DEFAULT,
15786        system_status: MavState::DEFAULT,
15787        mavlink_version: MINOR_MAVLINK_VERSION,
15788    };
15789    #[cfg(feature = "arbitrary")]
15790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15791        use arbitrary::{Arbitrary, Unstructured};
15792        let mut buf = [0u8; 1024];
15793        rng.fill_bytes(&mut buf);
15794        let mut unstructured = Unstructured::new(&buf);
15795        Self::arbitrary(&mut unstructured).unwrap_or_default()
15796    }
15797}
15798impl Default for HEARTBEAT_DATA {
15799    fn default() -> Self {
15800        Self::DEFAULT.clone()
15801    }
15802}
15803impl MessageData for HEARTBEAT_DATA {
15804    type Message = MavMessage;
15805    const ID: u32 = 0u32;
15806    const NAME: &'static str = "HEARTBEAT";
15807    const EXTRA_CRC: u8 = 50u8;
15808    const ENCODED_LEN: usize = 9usize;
15809    fn deser(
15810        _version: MavlinkVersion,
15811        __input: &[u8],
15812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15813        let avail_len = __input.len();
15814        let mut payload_buf = [0; Self::ENCODED_LEN];
15815        let mut buf = if avail_len < Self::ENCODED_LEN {
15816            payload_buf[0..avail_len].copy_from_slice(__input);
15817            Bytes::new(&payload_buf)
15818        } else {
15819            Bytes::new(__input)
15820        };
15821        let mut __struct = Self::default();
15822        __struct.custom_mode = buf.get_u32_le();
15823        let tmp = buf.get_u8();
15824        __struct.mavtype =
15825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15826                enum_type: "MavType",
15827                value: tmp as u32,
15828            })?;
15829        let tmp = buf.get_u8();
15830        __struct.autopilot =
15831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15832                enum_type: "MavAutopilot",
15833                value: tmp as u32,
15834            })?;
15835        let tmp = buf.get_u8();
15836        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15837            ::mavlink_core::error::ParserError::InvalidFlag {
15838                flag_type: "MavModeFlag",
15839                value: tmp as u32,
15840            },
15841        )?;
15842        let tmp = buf.get_u8();
15843        __struct.system_status =
15844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15845                enum_type: "MavState",
15846                value: tmp as u32,
15847            })?;
15848        __struct.mavlink_version = buf.get_u8();
15849        Ok(__struct)
15850    }
15851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15852        let mut __tmp = BytesMut::new(bytes);
15853        #[allow(clippy::absurd_extreme_comparisons)]
15854        #[allow(unused_comparisons)]
15855        if __tmp.remaining() < Self::ENCODED_LEN {
15856            panic!(
15857                "buffer is too small (need {} bytes, but got {})",
15858                Self::ENCODED_LEN,
15859                __tmp.remaining(),
15860            )
15861        }
15862        __tmp.put_u32_le(self.custom_mode);
15863        __tmp.put_u8(self.mavtype as u8);
15864        __tmp.put_u8(self.autopilot as u8);
15865        __tmp.put_u8(self.base_mode.bits());
15866        __tmp.put_u8(self.system_status as u8);
15867        __tmp.put_u8(self.mavlink_version);
15868        if matches!(version, MavlinkVersion::V2) {
15869            let len = __tmp.len();
15870            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15871        } else {
15872            __tmp.len()
15873        }
15874    }
15875}
15876#[doc = "The IMU readings in SI units in NED body frame."]
15877#[doc = ""]
15878#[doc = "ID: 105"]
15879#[derive(Debug, Clone, PartialEq)]
15880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15882#[cfg_attr(feature = "ts", derive(TS))]
15883#[cfg_attr(feature = "ts", ts(export))]
15884pub struct HIGHRES_IMU_DATA {
15885    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15886    pub time_usec: u64,
15887    #[doc = "X acceleration"]
15888    pub xacc: f32,
15889    #[doc = "Y acceleration"]
15890    pub yacc: f32,
15891    #[doc = "Z acceleration"]
15892    pub zacc: f32,
15893    #[doc = "Angular speed around X axis"]
15894    pub xgyro: f32,
15895    #[doc = "Angular speed around Y axis"]
15896    pub ygyro: f32,
15897    #[doc = "Angular speed around Z axis"]
15898    pub zgyro: f32,
15899    #[doc = "X Magnetic field"]
15900    pub xmag: f32,
15901    #[doc = "Y Magnetic field"]
15902    pub ymag: f32,
15903    #[doc = "Z Magnetic field"]
15904    pub zmag: f32,
15905    #[doc = "Absolute pressure"]
15906    pub abs_pressure: f32,
15907    #[doc = "Differential pressure"]
15908    pub diff_pressure: f32,
15909    #[doc = "Altitude calculated from pressure"]
15910    pub pressure_alt: f32,
15911    #[doc = "Temperature"]
15912    pub temperature: f32,
15913    #[doc = "Bitmap for fields that have updated since last message"]
15914    pub fields_updated: HighresImuUpdatedFlags,
15915    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15916    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15917    pub id: u8,
15918}
15919impl HIGHRES_IMU_DATA {
15920    pub const ENCODED_LEN: usize = 63usize;
15921    pub const DEFAULT: Self = Self {
15922        time_usec: 0_u64,
15923        xacc: 0.0_f32,
15924        yacc: 0.0_f32,
15925        zacc: 0.0_f32,
15926        xgyro: 0.0_f32,
15927        ygyro: 0.0_f32,
15928        zgyro: 0.0_f32,
15929        xmag: 0.0_f32,
15930        ymag: 0.0_f32,
15931        zmag: 0.0_f32,
15932        abs_pressure: 0.0_f32,
15933        diff_pressure: 0.0_f32,
15934        pressure_alt: 0.0_f32,
15935        temperature: 0.0_f32,
15936        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15937        id: 0_u8,
15938    };
15939    #[cfg(feature = "arbitrary")]
15940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15941        use arbitrary::{Arbitrary, Unstructured};
15942        let mut buf = [0u8; 1024];
15943        rng.fill_bytes(&mut buf);
15944        let mut unstructured = Unstructured::new(&buf);
15945        Self::arbitrary(&mut unstructured).unwrap_or_default()
15946    }
15947}
15948impl Default for HIGHRES_IMU_DATA {
15949    fn default() -> Self {
15950        Self::DEFAULT.clone()
15951    }
15952}
15953impl MessageData for HIGHRES_IMU_DATA {
15954    type Message = MavMessage;
15955    const ID: u32 = 105u32;
15956    const NAME: &'static str = "HIGHRES_IMU";
15957    const EXTRA_CRC: u8 = 93u8;
15958    const ENCODED_LEN: usize = 63usize;
15959    fn deser(
15960        _version: MavlinkVersion,
15961        __input: &[u8],
15962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15963        let avail_len = __input.len();
15964        let mut payload_buf = [0; Self::ENCODED_LEN];
15965        let mut buf = if avail_len < Self::ENCODED_LEN {
15966            payload_buf[0..avail_len].copy_from_slice(__input);
15967            Bytes::new(&payload_buf)
15968        } else {
15969            Bytes::new(__input)
15970        };
15971        let mut __struct = Self::default();
15972        __struct.time_usec = buf.get_u64_le();
15973        __struct.xacc = buf.get_f32_le();
15974        __struct.yacc = buf.get_f32_le();
15975        __struct.zacc = buf.get_f32_le();
15976        __struct.xgyro = buf.get_f32_le();
15977        __struct.ygyro = buf.get_f32_le();
15978        __struct.zgyro = buf.get_f32_le();
15979        __struct.xmag = buf.get_f32_le();
15980        __struct.ymag = buf.get_f32_le();
15981        __struct.zmag = buf.get_f32_le();
15982        __struct.abs_pressure = buf.get_f32_le();
15983        __struct.diff_pressure = buf.get_f32_le();
15984        __struct.pressure_alt = buf.get_f32_le();
15985        __struct.temperature = buf.get_f32_le();
15986        let tmp = buf.get_u16_le();
15987        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15988            tmp & HighresImuUpdatedFlags::all().bits(),
15989        )
15990        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15991            flag_type: "HighresImuUpdatedFlags",
15992            value: tmp as u32,
15993        })?;
15994        __struct.id = buf.get_u8();
15995        Ok(__struct)
15996    }
15997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15998        let mut __tmp = BytesMut::new(bytes);
15999        #[allow(clippy::absurd_extreme_comparisons)]
16000        #[allow(unused_comparisons)]
16001        if __tmp.remaining() < Self::ENCODED_LEN {
16002            panic!(
16003                "buffer is too small (need {} bytes, but got {})",
16004                Self::ENCODED_LEN,
16005                __tmp.remaining(),
16006            )
16007        }
16008        __tmp.put_u64_le(self.time_usec);
16009        __tmp.put_f32_le(self.xacc);
16010        __tmp.put_f32_le(self.yacc);
16011        __tmp.put_f32_le(self.zacc);
16012        __tmp.put_f32_le(self.xgyro);
16013        __tmp.put_f32_le(self.ygyro);
16014        __tmp.put_f32_le(self.zgyro);
16015        __tmp.put_f32_le(self.xmag);
16016        __tmp.put_f32_le(self.ymag);
16017        __tmp.put_f32_le(self.zmag);
16018        __tmp.put_f32_le(self.abs_pressure);
16019        __tmp.put_f32_le(self.diff_pressure);
16020        __tmp.put_f32_le(self.pressure_alt);
16021        __tmp.put_f32_le(self.temperature);
16022        __tmp.put_u16_le(self.fields_updated.bits());
16023        if matches!(version, MavlinkVersion::V2) {
16024            __tmp.put_u8(self.id);
16025            let len = __tmp.len();
16026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16027        } else {
16028            __tmp.len()
16029        }
16030    }
16031}
16032#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16033#[doc = "Message appropriate for high latency connections like Iridium."]
16034#[doc = ""]
16035#[doc = "ID: 234"]
16036#[derive(Debug, Clone, PartialEq)]
16037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16039#[cfg_attr(feature = "ts", derive(TS))]
16040#[cfg_attr(feature = "ts", ts(export))]
16041pub struct HIGH_LATENCY_DATA {
16042    #[doc = "A bitfield for use for autopilot-specific flags."]
16043    pub custom_mode: u32,
16044    #[doc = "Latitude"]
16045    pub latitude: i32,
16046    #[doc = "Longitude"]
16047    pub longitude: i32,
16048    #[doc = "roll"]
16049    pub roll: i16,
16050    #[doc = "pitch"]
16051    pub pitch: i16,
16052    #[doc = "heading"]
16053    pub heading: u16,
16054    #[doc = "heading setpoint"]
16055    pub heading_sp: i16,
16056    #[doc = "Altitude above mean sea level"]
16057    pub altitude_amsl: i16,
16058    #[doc = "Altitude setpoint relative to the home position"]
16059    pub altitude_sp: i16,
16060    #[doc = "distance to target"]
16061    pub wp_distance: u16,
16062    #[doc = "Bitmap of enabled system modes."]
16063    pub base_mode: MavModeFlag,
16064    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16065    pub landed_state: MavLandedState,
16066    #[doc = "throttle (percentage)"]
16067    pub throttle: i8,
16068    #[doc = "airspeed"]
16069    pub airspeed: u8,
16070    #[doc = "airspeed setpoint"]
16071    pub airspeed_sp: u8,
16072    #[doc = "groundspeed"]
16073    pub groundspeed: u8,
16074    #[doc = "climb rate"]
16075    pub climb_rate: i8,
16076    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16077    pub gps_nsat: u8,
16078    #[doc = "GPS Fix type."]
16079    pub gps_fix_type: GpsFixType,
16080    #[doc = "Remaining battery (percentage)"]
16081    pub battery_remaining: u8,
16082    #[doc = "Autopilot temperature (degrees C)"]
16083    pub temperature: i8,
16084    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16085    pub temperature_air: i8,
16086    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16087    pub failsafe: u8,
16088    #[doc = "current waypoint number"]
16089    pub wp_num: u8,
16090}
16091impl HIGH_LATENCY_DATA {
16092    pub const ENCODED_LEN: usize = 40usize;
16093    pub const DEFAULT: Self = Self {
16094        custom_mode: 0_u32,
16095        latitude: 0_i32,
16096        longitude: 0_i32,
16097        roll: 0_i16,
16098        pitch: 0_i16,
16099        heading: 0_u16,
16100        heading_sp: 0_i16,
16101        altitude_amsl: 0_i16,
16102        altitude_sp: 0_i16,
16103        wp_distance: 0_u16,
16104        base_mode: MavModeFlag::DEFAULT,
16105        landed_state: MavLandedState::DEFAULT,
16106        throttle: 0_i8,
16107        airspeed: 0_u8,
16108        airspeed_sp: 0_u8,
16109        groundspeed: 0_u8,
16110        climb_rate: 0_i8,
16111        gps_nsat: 0_u8,
16112        gps_fix_type: GpsFixType::DEFAULT,
16113        battery_remaining: 0_u8,
16114        temperature: 0_i8,
16115        temperature_air: 0_i8,
16116        failsafe: 0_u8,
16117        wp_num: 0_u8,
16118    };
16119    #[cfg(feature = "arbitrary")]
16120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16121        use arbitrary::{Arbitrary, Unstructured};
16122        let mut buf = [0u8; 1024];
16123        rng.fill_bytes(&mut buf);
16124        let mut unstructured = Unstructured::new(&buf);
16125        Self::arbitrary(&mut unstructured).unwrap_or_default()
16126    }
16127}
16128impl Default for HIGH_LATENCY_DATA {
16129    fn default() -> Self {
16130        Self::DEFAULT.clone()
16131    }
16132}
16133impl MessageData for HIGH_LATENCY_DATA {
16134    type Message = MavMessage;
16135    const ID: u32 = 234u32;
16136    const NAME: &'static str = "HIGH_LATENCY";
16137    const EXTRA_CRC: u8 = 150u8;
16138    const ENCODED_LEN: usize = 40usize;
16139    fn deser(
16140        _version: MavlinkVersion,
16141        __input: &[u8],
16142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16143        let avail_len = __input.len();
16144        let mut payload_buf = [0; Self::ENCODED_LEN];
16145        let mut buf = if avail_len < Self::ENCODED_LEN {
16146            payload_buf[0..avail_len].copy_from_slice(__input);
16147            Bytes::new(&payload_buf)
16148        } else {
16149            Bytes::new(__input)
16150        };
16151        let mut __struct = Self::default();
16152        __struct.custom_mode = buf.get_u32_le();
16153        __struct.latitude = buf.get_i32_le();
16154        __struct.longitude = buf.get_i32_le();
16155        __struct.roll = buf.get_i16_le();
16156        __struct.pitch = buf.get_i16_le();
16157        __struct.heading = buf.get_u16_le();
16158        __struct.heading_sp = buf.get_i16_le();
16159        __struct.altitude_amsl = buf.get_i16_le();
16160        __struct.altitude_sp = buf.get_i16_le();
16161        __struct.wp_distance = buf.get_u16_le();
16162        let tmp = buf.get_u8();
16163        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16164            ::mavlink_core::error::ParserError::InvalidFlag {
16165                flag_type: "MavModeFlag",
16166                value: tmp as u32,
16167            },
16168        )?;
16169        let tmp = buf.get_u8();
16170        __struct.landed_state =
16171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16172                enum_type: "MavLandedState",
16173                value: tmp as u32,
16174            })?;
16175        __struct.throttle = buf.get_i8();
16176        __struct.airspeed = buf.get_u8();
16177        __struct.airspeed_sp = buf.get_u8();
16178        __struct.groundspeed = buf.get_u8();
16179        __struct.climb_rate = buf.get_i8();
16180        __struct.gps_nsat = buf.get_u8();
16181        let tmp = buf.get_u8();
16182        __struct.gps_fix_type =
16183            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16184                enum_type: "GpsFixType",
16185                value: tmp as u32,
16186            })?;
16187        __struct.battery_remaining = buf.get_u8();
16188        __struct.temperature = buf.get_i8();
16189        __struct.temperature_air = buf.get_i8();
16190        __struct.failsafe = buf.get_u8();
16191        __struct.wp_num = buf.get_u8();
16192        Ok(__struct)
16193    }
16194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16195        let mut __tmp = BytesMut::new(bytes);
16196        #[allow(clippy::absurd_extreme_comparisons)]
16197        #[allow(unused_comparisons)]
16198        if __tmp.remaining() < Self::ENCODED_LEN {
16199            panic!(
16200                "buffer is too small (need {} bytes, but got {})",
16201                Self::ENCODED_LEN,
16202                __tmp.remaining(),
16203            )
16204        }
16205        __tmp.put_u32_le(self.custom_mode);
16206        __tmp.put_i32_le(self.latitude);
16207        __tmp.put_i32_le(self.longitude);
16208        __tmp.put_i16_le(self.roll);
16209        __tmp.put_i16_le(self.pitch);
16210        __tmp.put_u16_le(self.heading);
16211        __tmp.put_i16_le(self.heading_sp);
16212        __tmp.put_i16_le(self.altitude_amsl);
16213        __tmp.put_i16_le(self.altitude_sp);
16214        __tmp.put_u16_le(self.wp_distance);
16215        __tmp.put_u8(self.base_mode.bits());
16216        __tmp.put_u8(self.landed_state as u8);
16217        __tmp.put_i8(self.throttle);
16218        __tmp.put_u8(self.airspeed);
16219        __tmp.put_u8(self.airspeed_sp);
16220        __tmp.put_u8(self.groundspeed);
16221        __tmp.put_i8(self.climb_rate);
16222        __tmp.put_u8(self.gps_nsat);
16223        __tmp.put_u8(self.gps_fix_type as u8);
16224        __tmp.put_u8(self.battery_remaining);
16225        __tmp.put_i8(self.temperature);
16226        __tmp.put_i8(self.temperature_air);
16227        __tmp.put_u8(self.failsafe);
16228        __tmp.put_u8(self.wp_num);
16229        if matches!(version, MavlinkVersion::V2) {
16230            let len = __tmp.len();
16231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16232        } else {
16233            __tmp.len()
16234        }
16235    }
16236}
16237#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16238#[doc = ""]
16239#[doc = "ID: 235"]
16240#[derive(Debug, Clone, PartialEq)]
16241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16243#[cfg_attr(feature = "ts", derive(TS))]
16244#[cfg_attr(feature = "ts", ts(export))]
16245pub struct HIGH_LATENCY2_DATA {
16246    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16247    pub timestamp: u32,
16248    #[doc = "Latitude"]
16249    pub latitude: i32,
16250    #[doc = "Longitude"]
16251    pub longitude: i32,
16252    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16253    pub custom_mode: u16,
16254    #[doc = "Altitude above mean sea level"]
16255    pub altitude: i16,
16256    #[doc = "Altitude setpoint"]
16257    pub target_altitude: i16,
16258    #[doc = "Distance to target waypoint or position"]
16259    pub target_distance: u16,
16260    #[doc = "Current waypoint number"]
16261    pub wp_num: u16,
16262    #[doc = "Bitmap of failure flags."]
16263    pub failure_flags: HlFailureFlag,
16264    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16265    pub mavtype: MavType,
16266    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16267    pub autopilot: MavAutopilot,
16268    #[doc = "Heading"]
16269    pub heading: u8,
16270    #[doc = "Heading setpoint"]
16271    pub target_heading: u8,
16272    #[doc = "Throttle"]
16273    pub throttle: u8,
16274    #[doc = "Airspeed"]
16275    pub airspeed: u8,
16276    #[doc = "Airspeed setpoint"]
16277    pub airspeed_sp: u8,
16278    #[doc = "Groundspeed"]
16279    pub groundspeed: u8,
16280    #[doc = "Windspeed"]
16281    pub windspeed: u8,
16282    #[doc = "Wind heading"]
16283    pub wind_heading: u8,
16284    #[doc = "Maximum error horizontal position since last message"]
16285    pub eph: u8,
16286    #[doc = "Maximum error vertical position since last message"]
16287    pub epv: u8,
16288    #[doc = "Air temperature"]
16289    pub temperature_air: i8,
16290    #[doc = "Maximum climb rate magnitude since last message"]
16291    pub climb_rate: i8,
16292    #[doc = "Battery level (-1 if field not provided)."]
16293    pub battery: i8,
16294    #[doc = "Field for custom payload."]
16295    pub custom0: i8,
16296    #[doc = "Field for custom payload."]
16297    pub custom1: i8,
16298    #[doc = "Field for custom payload."]
16299    pub custom2: i8,
16300}
16301impl HIGH_LATENCY2_DATA {
16302    pub const ENCODED_LEN: usize = 42usize;
16303    pub const DEFAULT: Self = Self {
16304        timestamp: 0_u32,
16305        latitude: 0_i32,
16306        longitude: 0_i32,
16307        custom_mode: 0_u16,
16308        altitude: 0_i16,
16309        target_altitude: 0_i16,
16310        target_distance: 0_u16,
16311        wp_num: 0_u16,
16312        failure_flags: HlFailureFlag::DEFAULT,
16313        mavtype: MavType::DEFAULT,
16314        autopilot: MavAutopilot::DEFAULT,
16315        heading: 0_u8,
16316        target_heading: 0_u8,
16317        throttle: 0_u8,
16318        airspeed: 0_u8,
16319        airspeed_sp: 0_u8,
16320        groundspeed: 0_u8,
16321        windspeed: 0_u8,
16322        wind_heading: 0_u8,
16323        eph: 0_u8,
16324        epv: 0_u8,
16325        temperature_air: 0_i8,
16326        climb_rate: 0_i8,
16327        battery: 0_i8,
16328        custom0: 0_i8,
16329        custom1: 0_i8,
16330        custom2: 0_i8,
16331    };
16332    #[cfg(feature = "arbitrary")]
16333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16334        use arbitrary::{Arbitrary, Unstructured};
16335        let mut buf = [0u8; 1024];
16336        rng.fill_bytes(&mut buf);
16337        let mut unstructured = Unstructured::new(&buf);
16338        Self::arbitrary(&mut unstructured).unwrap_or_default()
16339    }
16340}
16341impl Default for HIGH_LATENCY2_DATA {
16342    fn default() -> Self {
16343        Self::DEFAULT.clone()
16344    }
16345}
16346impl MessageData for HIGH_LATENCY2_DATA {
16347    type Message = MavMessage;
16348    const ID: u32 = 235u32;
16349    const NAME: &'static str = "HIGH_LATENCY2";
16350    const EXTRA_CRC: u8 = 179u8;
16351    const ENCODED_LEN: usize = 42usize;
16352    fn deser(
16353        _version: MavlinkVersion,
16354        __input: &[u8],
16355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16356        let avail_len = __input.len();
16357        let mut payload_buf = [0; Self::ENCODED_LEN];
16358        let mut buf = if avail_len < Self::ENCODED_LEN {
16359            payload_buf[0..avail_len].copy_from_slice(__input);
16360            Bytes::new(&payload_buf)
16361        } else {
16362            Bytes::new(__input)
16363        };
16364        let mut __struct = Self::default();
16365        __struct.timestamp = buf.get_u32_le();
16366        __struct.latitude = buf.get_i32_le();
16367        __struct.longitude = buf.get_i32_le();
16368        __struct.custom_mode = buf.get_u16_le();
16369        __struct.altitude = buf.get_i16_le();
16370        __struct.target_altitude = buf.get_i16_le();
16371        __struct.target_distance = buf.get_u16_le();
16372        __struct.wp_num = buf.get_u16_le();
16373        let tmp = buf.get_u16_le();
16374        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16375            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16376                flag_type: "HlFailureFlag",
16377                value: tmp as u32,
16378            })?;
16379        let tmp = buf.get_u8();
16380        __struct.mavtype =
16381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16382                enum_type: "MavType",
16383                value: tmp as u32,
16384            })?;
16385        let tmp = buf.get_u8();
16386        __struct.autopilot =
16387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16388                enum_type: "MavAutopilot",
16389                value: tmp as u32,
16390            })?;
16391        __struct.heading = buf.get_u8();
16392        __struct.target_heading = buf.get_u8();
16393        __struct.throttle = buf.get_u8();
16394        __struct.airspeed = buf.get_u8();
16395        __struct.airspeed_sp = buf.get_u8();
16396        __struct.groundspeed = buf.get_u8();
16397        __struct.windspeed = buf.get_u8();
16398        __struct.wind_heading = buf.get_u8();
16399        __struct.eph = buf.get_u8();
16400        __struct.epv = buf.get_u8();
16401        __struct.temperature_air = buf.get_i8();
16402        __struct.climb_rate = buf.get_i8();
16403        __struct.battery = buf.get_i8();
16404        __struct.custom0 = buf.get_i8();
16405        __struct.custom1 = buf.get_i8();
16406        __struct.custom2 = buf.get_i8();
16407        Ok(__struct)
16408    }
16409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16410        let mut __tmp = BytesMut::new(bytes);
16411        #[allow(clippy::absurd_extreme_comparisons)]
16412        #[allow(unused_comparisons)]
16413        if __tmp.remaining() < Self::ENCODED_LEN {
16414            panic!(
16415                "buffer is too small (need {} bytes, but got {})",
16416                Self::ENCODED_LEN,
16417                __tmp.remaining(),
16418            )
16419        }
16420        __tmp.put_u32_le(self.timestamp);
16421        __tmp.put_i32_le(self.latitude);
16422        __tmp.put_i32_le(self.longitude);
16423        __tmp.put_u16_le(self.custom_mode);
16424        __tmp.put_i16_le(self.altitude);
16425        __tmp.put_i16_le(self.target_altitude);
16426        __tmp.put_u16_le(self.target_distance);
16427        __tmp.put_u16_le(self.wp_num);
16428        __tmp.put_u16_le(self.failure_flags.bits());
16429        __tmp.put_u8(self.mavtype as u8);
16430        __tmp.put_u8(self.autopilot as u8);
16431        __tmp.put_u8(self.heading);
16432        __tmp.put_u8(self.target_heading);
16433        __tmp.put_u8(self.throttle);
16434        __tmp.put_u8(self.airspeed);
16435        __tmp.put_u8(self.airspeed_sp);
16436        __tmp.put_u8(self.groundspeed);
16437        __tmp.put_u8(self.windspeed);
16438        __tmp.put_u8(self.wind_heading);
16439        __tmp.put_u8(self.eph);
16440        __tmp.put_u8(self.epv);
16441        __tmp.put_i8(self.temperature_air);
16442        __tmp.put_i8(self.climb_rate);
16443        __tmp.put_i8(self.battery);
16444        __tmp.put_i8(self.custom0);
16445        __tmp.put_i8(self.custom1);
16446        __tmp.put_i8(self.custom2);
16447        if matches!(version, MavlinkVersion::V2) {
16448            let len = __tmp.len();
16449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16450        } else {
16451            __tmp.len()
16452        }
16453    }
16454}
16455#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16456#[doc = ""]
16457#[doc = "ID: 93"]
16458#[derive(Debug, Clone, PartialEq)]
16459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16461#[cfg_attr(feature = "ts", derive(TS))]
16462#[cfg_attr(feature = "ts", ts(export))]
16463pub struct HIL_ACTUATOR_CONTROLS_DATA {
16464    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16465    pub time_usec: u64,
16466    #[doc = "Flags bitmask."]
16467    pub flags: HilActuatorControlsFlags,
16468    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16471    pub controls: [f32; 16],
16472    #[doc = "System mode. Includes arming state."]
16473    pub mode: MavModeFlag,
16474}
16475impl HIL_ACTUATOR_CONTROLS_DATA {
16476    pub const ENCODED_LEN: usize = 81usize;
16477    pub const DEFAULT: Self = Self {
16478        time_usec: 0_u64,
16479        flags: HilActuatorControlsFlags::DEFAULT,
16480        controls: [0.0_f32; 16usize],
16481        mode: MavModeFlag::DEFAULT,
16482    };
16483    #[cfg(feature = "arbitrary")]
16484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16485        use arbitrary::{Arbitrary, Unstructured};
16486        let mut buf = [0u8; 1024];
16487        rng.fill_bytes(&mut buf);
16488        let mut unstructured = Unstructured::new(&buf);
16489        Self::arbitrary(&mut unstructured).unwrap_or_default()
16490    }
16491}
16492impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16493    fn default() -> Self {
16494        Self::DEFAULT.clone()
16495    }
16496}
16497impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16498    type Message = MavMessage;
16499    const ID: u32 = 93u32;
16500    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16501    const EXTRA_CRC: u8 = 47u8;
16502    const ENCODED_LEN: usize = 81usize;
16503    fn deser(
16504        _version: MavlinkVersion,
16505        __input: &[u8],
16506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16507        let avail_len = __input.len();
16508        let mut payload_buf = [0; Self::ENCODED_LEN];
16509        let mut buf = if avail_len < Self::ENCODED_LEN {
16510            payload_buf[0..avail_len].copy_from_slice(__input);
16511            Bytes::new(&payload_buf)
16512        } else {
16513            Bytes::new(__input)
16514        };
16515        let mut __struct = Self::default();
16516        __struct.time_usec = buf.get_u64_le();
16517        let tmp = buf.get_u64_le();
16518        __struct.flags =
16519            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16520                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16521                    flag_type: "HilActuatorControlsFlags",
16522                    value: tmp as u32,
16523                })?;
16524        for v in &mut __struct.controls {
16525            let val = buf.get_f32_le();
16526            *v = val;
16527        }
16528        let tmp = buf.get_u8();
16529        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16530            ::mavlink_core::error::ParserError::InvalidFlag {
16531                flag_type: "MavModeFlag",
16532                value: tmp as u32,
16533            },
16534        )?;
16535        Ok(__struct)
16536    }
16537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16538        let mut __tmp = BytesMut::new(bytes);
16539        #[allow(clippy::absurd_extreme_comparisons)]
16540        #[allow(unused_comparisons)]
16541        if __tmp.remaining() < Self::ENCODED_LEN {
16542            panic!(
16543                "buffer is too small (need {} bytes, but got {})",
16544                Self::ENCODED_LEN,
16545                __tmp.remaining(),
16546            )
16547        }
16548        __tmp.put_u64_le(self.time_usec);
16549        __tmp.put_u64_le(self.flags.bits());
16550        for val in &self.controls {
16551            __tmp.put_f32_le(*val);
16552        }
16553        __tmp.put_u8(self.mode.bits());
16554        if matches!(version, MavlinkVersion::V2) {
16555            let len = __tmp.len();
16556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16557        } else {
16558            __tmp.len()
16559        }
16560    }
16561}
16562#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16563#[doc = ""]
16564#[doc = "ID: 91"]
16565#[derive(Debug, Clone, PartialEq)]
16566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16568#[cfg_attr(feature = "ts", derive(TS))]
16569#[cfg_attr(feature = "ts", ts(export))]
16570pub struct HIL_CONTROLS_DATA {
16571    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16572    pub time_usec: u64,
16573    #[doc = "Control output -1 .. 1"]
16574    pub roll_ailerons: f32,
16575    #[doc = "Control output -1 .. 1"]
16576    pub pitch_elevator: f32,
16577    #[doc = "Control output -1 .. 1"]
16578    pub yaw_rudder: f32,
16579    #[doc = "Throttle 0 .. 1"]
16580    pub throttle: f32,
16581    #[doc = "Aux 1, -1 .. 1"]
16582    pub aux1: f32,
16583    #[doc = "Aux 2, -1 .. 1"]
16584    pub aux2: f32,
16585    #[doc = "Aux 3, -1 .. 1"]
16586    pub aux3: f32,
16587    #[doc = "Aux 4, -1 .. 1"]
16588    pub aux4: f32,
16589    #[doc = "System mode."]
16590    pub mode: MavMode,
16591    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16592    pub nav_mode: u8,
16593}
16594impl HIL_CONTROLS_DATA {
16595    pub const ENCODED_LEN: usize = 42usize;
16596    pub const DEFAULT: Self = Self {
16597        time_usec: 0_u64,
16598        roll_ailerons: 0.0_f32,
16599        pitch_elevator: 0.0_f32,
16600        yaw_rudder: 0.0_f32,
16601        throttle: 0.0_f32,
16602        aux1: 0.0_f32,
16603        aux2: 0.0_f32,
16604        aux3: 0.0_f32,
16605        aux4: 0.0_f32,
16606        mode: MavMode::DEFAULT,
16607        nav_mode: 0_u8,
16608    };
16609    #[cfg(feature = "arbitrary")]
16610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16611        use arbitrary::{Arbitrary, Unstructured};
16612        let mut buf = [0u8; 1024];
16613        rng.fill_bytes(&mut buf);
16614        let mut unstructured = Unstructured::new(&buf);
16615        Self::arbitrary(&mut unstructured).unwrap_or_default()
16616    }
16617}
16618impl Default for HIL_CONTROLS_DATA {
16619    fn default() -> Self {
16620        Self::DEFAULT.clone()
16621    }
16622}
16623impl MessageData for HIL_CONTROLS_DATA {
16624    type Message = MavMessage;
16625    const ID: u32 = 91u32;
16626    const NAME: &'static str = "HIL_CONTROLS";
16627    const EXTRA_CRC: u8 = 63u8;
16628    const ENCODED_LEN: usize = 42usize;
16629    fn deser(
16630        _version: MavlinkVersion,
16631        __input: &[u8],
16632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16633        let avail_len = __input.len();
16634        let mut payload_buf = [0; Self::ENCODED_LEN];
16635        let mut buf = if avail_len < Self::ENCODED_LEN {
16636            payload_buf[0..avail_len].copy_from_slice(__input);
16637            Bytes::new(&payload_buf)
16638        } else {
16639            Bytes::new(__input)
16640        };
16641        let mut __struct = Self::default();
16642        __struct.time_usec = buf.get_u64_le();
16643        __struct.roll_ailerons = buf.get_f32_le();
16644        __struct.pitch_elevator = buf.get_f32_le();
16645        __struct.yaw_rudder = buf.get_f32_le();
16646        __struct.throttle = buf.get_f32_le();
16647        __struct.aux1 = buf.get_f32_le();
16648        __struct.aux2 = buf.get_f32_le();
16649        __struct.aux3 = buf.get_f32_le();
16650        __struct.aux4 = buf.get_f32_le();
16651        let tmp = buf.get_u8();
16652        __struct.mode =
16653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16654                enum_type: "MavMode",
16655                value: tmp as u32,
16656            })?;
16657        __struct.nav_mode = buf.get_u8();
16658        Ok(__struct)
16659    }
16660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16661        let mut __tmp = BytesMut::new(bytes);
16662        #[allow(clippy::absurd_extreme_comparisons)]
16663        #[allow(unused_comparisons)]
16664        if __tmp.remaining() < Self::ENCODED_LEN {
16665            panic!(
16666                "buffer is too small (need {} bytes, but got {})",
16667                Self::ENCODED_LEN,
16668                __tmp.remaining(),
16669            )
16670        }
16671        __tmp.put_u64_le(self.time_usec);
16672        __tmp.put_f32_le(self.roll_ailerons);
16673        __tmp.put_f32_le(self.pitch_elevator);
16674        __tmp.put_f32_le(self.yaw_rudder);
16675        __tmp.put_f32_le(self.throttle);
16676        __tmp.put_f32_le(self.aux1);
16677        __tmp.put_f32_le(self.aux2);
16678        __tmp.put_f32_le(self.aux3);
16679        __tmp.put_f32_le(self.aux4);
16680        __tmp.put_u8(self.mode as u8);
16681        __tmp.put_u8(self.nav_mode);
16682        if matches!(version, MavlinkVersion::V2) {
16683            let len = __tmp.len();
16684            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16685        } else {
16686            __tmp.len()
16687        }
16688    }
16689}
16690#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16691#[doc = ""]
16692#[doc = "ID: 113"]
16693#[derive(Debug, Clone, PartialEq)]
16694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16696#[cfg_attr(feature = "ts", derive(TS))]
16697#[cfg_attr(feature = "ts", ts(export))]
16698pub struct HIL_GPS_DATA {
16699    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16700    pub time_usec: u64,
16701    #[doc = "Latitude (WGS84)"]
16702    pub lat: i32,
16703    #[doc = "Longitude (WGS84)"]
16704    pub lon: i32,
16705    #[doc = "Altitude (MSL). Positive for up."]
16706    pub alt: i32,
16707    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16708    pub eph: u16,
16709    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16710    pub epv: u16,
16711    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16712    pub vel: u16,
16713    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16714    pub vn: i16,
16715    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16716    pub ve: i16,
16717    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16718    pub vd: i16,
16719    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16720    pub cog: u16,
16721    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16722    pub fix_type: u8,
16723    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16724    pub satellites_visible: u8,
16725    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16727    pub id: u8,
16728    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16729    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16730    pub yaw: u16,
16731}
16732impl HIL_GPS_DATA {
16733    pub const ENCODED_LEN: usize = 39usize;
16734    pub const DEFAULT: Self = Self {
16735        time_usec: 0_u64,
16736        lat: 0_i32,
16737        lon: 0_i32,
16738        alt: 0_i32,
16739        eph: 0_u16,
16740        epv: 0_u16,
16741        vel: 0_u16,
16742        vn: 0_i16,
16743        ve: 0_i16,
16744        vd: 0_i16,
16745        cog: 0_u16,
16746        fix_type: 0_u8,
16747        satellites_visible: 0_u8,
16748        id: 0_u8,
16749        yaw: 0_u16,
16750    };
16751    #[cfg(feature = "arbitrary")]
16752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16753        use arbitrary::{Arbitrary, Unstructured};
16754        let mut buf = [0u8; 1024];
16755        rng.fill_bytes(&mut buf);
16756        let mut unstructured = Unstructured::new(&buf);
16757        Self::arbitrary(&mut unstructured).unwrap_or_default()
16758    }
16759}
16760impl Default for HIL_GPS_DATA {
16761    fn default() -> Self {
16762        Self::DEFAULT.clone()
16763    }
16764}
16765impl MessageData for HIL_GPS_DATA {
16766    type Message = MavMessage;
16767    const ID: u32 = 113u32;
16768    const NAME: &'static str = "HIL_GPS";
16769    const EXTRA_CRC: u8 = 124u8;
16770    const ENCODED_LEN: usize = 39usize;
16771    fn deser(
16772        _version: MavlinkVersion,
16773        __input: &[u8],
16774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16775        let avail_len = __input.len();
16776        let mut payload_buf = [0; Self::ENCODED_LEN];
16777        let mut buf = if avail_len < Self::ENCODED_LEN {
16778            payload_buf[0..avail_len].copy_from_slice(__input);
16779            Bytes::new(&payload_buf)
16780        } else {
16781            Bytes::new(__input)
16782        };
16783        let mut __struct = Self::default();
16784        __struct.time_usec = buf.get_u64_le();
16785        __struct.lat = buf.get_i32_le();
16786        __struct.lon = buf.get_i32_le();
16787        __struct.alt = buf.get_i32_le();
16788        __struct.eph = buf.get_u16_le();
16789        __struct.epv = buf.get_u16_le();
16790        __struct.vel = buf.get_u16_le();
16791        __struct.vn = buf.get_i16_le();
16792        __struct.ve = buf.get_i16_le();
16793        __struct.vd = buf.get_i16_le();
16794        __struct.cog = buf.get_u16_le();
16795        __struct.fix_type = buf.get_u8();
16796        __struct.satellites_visible = buf.get_u8();
16797        __struct.id = buf.get_u8();
16798        __struct.yaw = buf.get_u16_le();
16799        Ok(__struct)
16800    }
16801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16802        let mut __tmp = BytesMut::new(bytes);
16803        #[allow(clippy::absurd_extreme_comparisons)]
16804        #[allow(unused_comparisons)]
16805        if __tmp.remaining() < Self::ENCODED_LEN {
16806            panic!(
16807                "buffer is too small (need {} bytes, but got {})",
16808                Self::ENCODED_LEN,
16809                __tmp.remaining(),
16810            )
16811        }
16812        __tmp.put_u64_le(self.time_usec);
16813        __tmp.put_i32_le(self.lat);
16814        __tmp.put_i32_le(self.lon);
16815        __tmp.put_i32_le(self.alt);
16816        __tmp.put_u16_le(self.eph);
16817        __tmp.put_u16_le(self.epv);
16818        __tmp.put_u16_le(self.vel);
16819        __tmp.put_i16_le(self.vn);
16820        __tmp.put_i16_le(self.ve);
16821        __tmp.put_i16_le(self.vd);
16822        __tmp.put_u16_le(self.cog);
16823        __tmp.put_u8(self.fix_type);
16824        __tmp.put_u8(self.satellites_visible);
16825        if matches!(version, MavlinkVersion::V2) {
16826            __tmp.put_u8(self.id);
16827            __tmp.put_u16_le(self.yaw);
16828            let len = __tmp.len();
16829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16830        } else {
16831            __tmp.len()
16832        }
16833    }
16834}
16835#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16836#[doc = ""]
16837#[doc = "ID: 114"]
16838#[derive(Debug, Clone, PartialEq)]
16839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16841#[cfg_attr(feature = "ts", derive(TS))]
16842#[cfg_attr(feature = "ts", ts(export))]
16843pub struct HIL_OPTICAL_FLOW_DATA {
16844    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16845    pub time_usec: u64,
16846    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16847    pub integration_time_us: u32,
16848    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16849    pub integrated_x: f32,
16850    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16851    pub integrated_y: f32,
16852    #[doc = "RH rotation around X axis"]
16853    pub integrated_xgyro: f32,
16854    #[doc = "RH rotation around Y axis"]
16855    pub integrated_ygyro: f32,
16856    #[doc = "RH rotation around Z axis"]
16857    pub integrated_zgyro: f32,
16858    #[doc = "Time since the distance was sampled."]
16859    pub time_delta_distance_us: u32,
16860    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16861    pub distance: f32,
16862    #[doc = "Temperature"]
16863    pub temperature: i16,
16864    #[doc = "Sensor ID"]
16865    pub sensor_id: u8,
16866    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16867    pub quality: u8,
16868}
16869impl HIL_OPTICAL_FLOW_DATA {
16870    pub const ENCODED_LEN: usize = 44usize;
16871    pub const DEFAULT: Self = Self {
16872        time_usec: 0_u64,
16873        integration_time_us: 0_u32,
16874        integrated_x: 0.0_f32,
16875        integrated_y: 0.0_f32,
16876        integrated_xgyro: 0.0_f32,
16877        integrated_ygyro: 0.0_f32,
16878        integrated_zgyro: 0.0_f32,
16879        time_delta_distance_us: 0_u32,
16880        distance: 0.0_f32,
16881        temperature: 0_i16,
16882        sensor_id: 0_u8,
16883        quality: 0_u8,
16884    };
16885    #[cfg(feature = "arbitrary")]
16886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16887        use arbitrary::{Arbitrary, Unstructured};
16888        let mut buf = [0u8; 1024];
16889        rng.fill_bytes(&mut buf);
16890        let mut unstructured = Unstructured::new(&buf);
16891        Self::arbitrary(&mut unstructured).unwrap_or_default()
16892    }
16893}
16894impl Default for HIL_OPTICAL_FLOW_DATA {
16895    fn default() -> Self {
16896        Self::DEFAULT.clone()
16897    }
16898}
16899impl MessageData for HIL_OPTICAL_FLOW_DATA {
16900    type Message = MavMessage;
16901    const ID: u32 = 114u32;
16902    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16903    const EXTRA_CRC: u8 = 237u8;
16904    const ENCODED_LEN: usize = 44usize;
16905    fn deser(
16906        _version: MavlinkVersion,
16907        __input: &[u8],
16908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16909        let avail_len = __input.len();
16910        let mut payload_buf = [0; Self::ENCODED_LEN];
16911        let mut buf = if avail_len < Self::ENCODED_LEN {
16912            payload_buf[0..avail_len].copy_from_slice(__input);
16913            Bytes::new(&payload_buf)
16914        } else {
16915            Bytes::new(__input)
16916        };
16917        let mut __struct = Self::default();
16918        __struct.time_usec = buf.get_u64_le();
16919        __struct.integration_time_us = buf.get_u32_le();
16920        __struct.integrated_x = buf.get_f32_le();
16921        __struct.integrated_y = buf.get_f32_le();
16922        __struct.integrated_xgyro = buf.get_f32_le();
16923        __struct.integrated_ygyro = buf.get_f32_le();
16924        __struct.integrated_zgyro = buf.get_f32_le();
16925        __struct.time_delta_distance_us = buf.get_u32_le();
16926        __struct.distance = buf.get_f32_le();
16927        __struct.temperature = buf.get_i16_le();
16928        __struct.sensor_id = buf.get_u8();
16929        __struct.quality = buf.get_u8();
16930        Ok(__struct)
16931    }
16932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16933        let mut __tmp = BytesMut::new(bytes);
16934        #[allow(clippy::absurd_extreme_comparisons)]
16935        #[allow(unused_comparisons)]
16936        if __tmp.remaining() < Self::ENCODED_LEN {
16937            panic!(
16938                "buffer is too small (need {} bytes, but got {})",
16939                Self::ENCODED_LEN,
16940                __tmp.remaining(),
16941            )
16942        }
16943        __tmp.put_u64_le(self.time_usec);
16944        __tmp.put_u32_le(self.integration_time_us);
16945        __tmp.put_f32_le(self.integrated_x);
16946        __tmp.put_f32_le(self.integrated_y);
16947        __tmp.put_f32_le(self.integrated_xgyro);
16948        __tmp.put_f32_le(self.integrated_ygyro);
16949        __tmp.put_f32_le(self.integrated_zgyro);
16950        __tmp.put_u32_le(self.time_delta_distance_us);
16951        __tmp.put_f32_le(self.distance);
16952        __tmp.put_i16_le(self.temperature);
16953        __tmp.put_u8(self.sensor_id);
16954        __tmp.put_u8(self.quality);
16955        if matches!(version, MavlinkVersion::V2) {
16956            let len = __tmp.len();
16957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16958        } else {
16959            __tmp.len()
16960        }
16961    }
16962}
16963#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16964#[doc = ""]
16965#[doc = "ID: 92"]
16966#[derive(Debug, Clone, PartialEq)]
16967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16969#[cfg_attr(feature = "ts", derive(TS))]
16970#[cfg_attr(feature = "ts", ts(export))]
16971pub struct HIL_RC_INPUTS_RAW_DATA {
16972    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16973    pub time_usec: u64,
16974    #[doc = "RC channel 1 value"]
16975    pub chan1_raw: u16,
16976    #[doc = "RC channel 2 value"]
16977    pub chan2_raw: u16,
16978    #[doc = "RC channel 3 value"]
16979    pub chan3_raw: u16,
16980    #[doc = "RC channel 4 value"]
16981    pub chan4_raw: u16,
16982    #[doc = "RC channel 5 value"]
16983    pub chan5_raw: u16,
16984    #[doc = "RC channel 6 value"]
16985    pub chan6_raw: u16,
16986    #[doc = "RC channel 7 value"]
16987    pub chan7_raw: u16,
16988    #[doc = "RC channel 8 value"]
16989    pub chan8_raw: u16,
16990    #[doc = "RC channel 9 value"]
16991    pub chan9_raw: u16,
16992    #[doc = "RC channel 10 value"]
16993    pub chan10_raw: u16,
16994    #[doc = "RC channel 11 value"]
16995    pub chan11_raw: u16,
16996    #[doc = "RC channel 12 value"]
16997    pub chan12_raw: u16,
16998    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16999    pub rssi: u8,
17000}
17001impl HIL_RC_INPUTS_RAW_DATA {
17002    pub const ENCODED_LEN: usize = 33usize;
17003    pub const DEFAULT: Self = Self {
17004        time_usec: 0_u64,
17005        chan1_raw: 0_u16,
17006        chan2_raw: 0_u16,
17007        chan3_raw: 0_u16,
17008        chan4_raw: 0_u16,
17009        chan5_raw: 0_u16,
17010        chan6_raw: 0_u16,
17011        chan7_raw: 0_u16,
17012        chan8_raw: 0_u16,
17013        chan9_raw: 0_u16,
17014        chan10_raw: 0_u16,
17015        chan11_raw: 0_u16,
17016        chan12_raw: 0_u16,
17017        rssi: 0_u8,
17018    };
17019    #[cfg(feature = "arbitrary")]
17020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17021        use arbitrary::{Arbitrary, Unstructured};
17022        let mut buf = [0u8; 1024];
17023        rng.fill_bytes(&mut buf);
17024        let mut unstructured = Unstructured::new(&buf);
17025        Self::arbitrary(&mut unstructured).unwrap_or_default()
17026    }
17027}
17028impl Default for HIL_RC_INPUTS_RAW_DATA {
17029    fn default() -> Self {
17030        Self::DEFAULT.clone()
17031    }
17032}
17033impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17034    type Message = MavMessage;
17035    const ID: u32 = 92u32;
17036    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17037    const EXTRA_CRC: u8 = 54u8;
17038    const ENCODED_LEN: usize = 33usize;
17039    fn deser(
17040        _version: MavlinkVersion,
17041        __input: &[u8],
17042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17043        let avail_len = __input.len();
17044        let mut payload_buf = [0; Self::ENCODED_LEN];
17045        let mut buf = if avail_len < Self::ENCODED_LEN {
17046            payload_buf[0..avail_len].copy_from_slice(__input);
17047            Bytes::new(&payload_buf)
17048        } else {
17049            Bytes::new(__input)
17050        };
17051        let mut __struct = Self::default();
17052        __struct.time_usec = buf.get_u64_le();
17053        __struct.chan1_raw = buf.get_u16_le();
17054        __struct.chan2_raw = buf.get_u16_le();
17055        __struct.chan3_raw = buf.get_u16_le();
17056        __struct.chan4_raw = buf.get_u16_le();
17057        __struct.chan5_raw = buf.get_u16_le();
17058        __struct.chan6_raw = buf.get_u16_le();
17059        __struct.chan7_raw = buf.get_u16_le();
17060        __struct.chan8_raw = buf.get_u16_le();
17061        __struct.chan9_raw = buf.get_u16_le();
17062        __struct.chan10_raw = buf.get_u16_le();
17063        __struct.chan11_raw = buf.get_u16_le();
17064        __struct.chan12_raw = buf.get_u16_le();
17065        __struct.rssi = buf.get_u8();
17066        Ok(__struct)
17067    }
17068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17069        let mut __tmp = BytesMut::new(bytes);
17070        #[allow(clippy::absurd_extreme_comparisons)]
17071        #[allow(unused_comparisons)]
17072        if __tmp.remaining() < Self::ENCODED_LEN {
17073            panic!(
17074                "buffer is too small (need {} bytes, but got {})",
17075                Self::ENCODED_LEN,
17076                __tmp.remaining(),
17077            )
17078        }
17079        __tmp.put_u64_le(self.time_usec);
17080        __tmp.put_u16_le(self.chan1_raw);
17081        __tmp.put_u16_le(self.chan2_raw);
17082        __tmp.put_u16_le(self.chan3_raw);
17083        __tmp.put_u16_le(self.chan4_raw);
17084        __tmp.put_u16_le(self.chan5_raw);
17085        __tmp.put_u16_le(self.chan6_raw);
17086        __tmp.put_u16_le(self.chan7_raw);
17087        __tmp.put_u16_le(self.chan8_raw);
17088        __tmp.put_u16_le(self.chan9_raw);
17089        __tmp.put_u16_le(self.chan10_raw);
17090        __tmp.put_u16_le(self.chan11_raw);
17091        __tmp.put_u16_le(self.chan12_raw);
17092        __tmp.put_u8(self.rssi);
17093        if matches!(version, MavlinkVersion::V2) {
17094            let len = __tmp.len();
17095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17096        } else {
17097            __tmp.len()
17098        }
17099    }
17100}
17101#[doc = "The IMU readings in SI units in NED body frame."]
17102#[doc = ""]
17103#[doc = "ID: 107"]
17104#[derive(Debug, Clone, PartialEq)]
17105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17107#[cfg_attr(feature = "ts", derive(TS))]
17108#[cfg_attr(feature = "ts", ts(export))]
17109pub struct HIL_SENSOR_DATA {
17110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17111    pub time_usec: u64,
17112    #[doc = "X acceleration"]
17113    pub xacc: f32,
17114    #[doc = "Y acceleration"]
17115    pub yacc: f32,
17116    #[doc = "Z acceleration"]
17117    pub zacc: f32,
17118    #[doc = "Angular speed around X axis in body frame"]
17119    pub xgyro: f32,
17120    #[doc = "Angular speed around Y axis in body frame"]
17121    pub ygyro: f32,
17122    #[doc = "Angular speed around Z axis in body frame"]
17123    pub zgyro: f32,
17124    #[doc = "X Magnetic field"]
17125    pub xmag: f32,
17126    #[doc = "Y Magnetic field"]
17127    pub ymag: f32,
17128    #[doc = "Z Magnetic field"]
17129    pub zmag: f32,
17130    #[doc = "Absolute pressure"]
17131    pub abs_pressure: f32,
17132    #[doc = "Differential pressure (airspeed)"]
17133    pub diff_pressure: f32,
17134    #[doc = "Altitude calculated from pressure"]
17135    pub pressure_alt: f32,
17136    #[doc = "Temperature"]
17137    pub temperature: f32,
17138    #[doc = "Bitmap for fields that have updated since last message"]
17139    pub fields_updated: HilSensorUpdatedFlags,
17140    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17141    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17142    pub id: u8,
17143}
17144impl HIL_SENSOR_DATA {
17145    pub const ENCODED_LEN: usize = 65usize;
17146    pub const DEFAULT: Self = Self {
17147        time_usec: 0_u64,
17148        xacc: 0.0_f32,
17149        yacc: 0.0_f32,
17150        zacc: 0.0_f32,
17151        xgyro: 0.0_f32,
17152        ygyro: 0.0_f32,
17153        zgyro: 0.0_f32,
17154        xmag: 0.0_f32,
17155        ymag: 0.0_f32,
17156        zmag: 0.0_f32,
17157        abs_pressure: 0.0_f32,
17158        diff_pressure: 0.0_f32,
17159        pressure_alt: 0.0_f32,
17160        temperature: 0.0_f32,
17161        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17162        id: 0_u8,
17163    };
17164    #[cfg(feature = "arbitrary")]
17165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17166        use arbitrary::{Arbitrary, Unstructured};
17167        let mut buf = [0u8; 1024];
17168        rng.fill_bytes(&mut buf);
17169        let mut unstructured = Unstructured::new(&buf);
17170        Self::arbitrary(&mut unstructured).unwrap_or_default()
17171    }
17172}
17173impl Default for HIL_SENSOR_DATA {
17174    fn default() -> Self {
17175        Self::DEFAULT.clone()
17176    }
17177}
17178impl MessageData for HIL_SENSOR_DATA {
17179    type Message = MavMessage;
17180    const ID: u32 = 107u32;
17181    const NAME: &'static str = "HIL_SENSOR";
17182    const EXTRA_CRC: u8 = 108u8;
17183    const ENCODED_LEN: usize = 65usize;
17184    fn deser(
17185        _version: MavlinkVersion,
17186        __input: &[u8],
17187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17188        let avail_len = __input.len();
17189        let mut payload_buf = [0; Self::ENCODED_LEN];
17190        let mut buf = if avail_len < Self::ENCODED_LEN {
17191            payload_buf[0..avail_len].copy_from_slice(__input);
17192            Bytes::new(&payload_buf)
17193        } else {
17194            Bytes::new(__input)
17195        };
17196        let mut __struct = Self::default();
17197        __struct.time_usec = buf.get_u64_le();
17198        __struct.xacc = buf.get_f32_le();
17199        __struct.yacc = buf.get_f32_le();
17200        __struct.zacc = buf.get_f32_le();
17201        __struct.xgyro = buf.get_f32_le();
17202        __struct.ygyro = buf.get_f32_le();
17203        __struct.zgyro = buf.get_f32_le();
17204        __struct.xmag = buf.get_f32_le();
17205        __struct.ymag = buf.get_f32_le();
17206        __struct.zmag = buf.get_f32_le();
17207        __struct.abs_pressure = buf.get_f32_le();
17208        __struct.diff_pressure = buf.get_f32_le();
17209        __struct.pressure_alt = buf.get_f32_le();
17210        __struct.temperature = buf.get_f32_le();
17211        let tmp = buf.get_u32_le();
17212        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17213            tmp & HilSensorUpdatedFlags::all().bits(),
17214        )
17215        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17216            flag_type: "HilSensorUpdatedFlags",
17217            value: tmp as u32,
17218        })?;
17219        __struct.id = buf.get_u8();
17220        Ok(__struct)
17221    }
17222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17223        let mut __tmp = BytesMut::new(bytes);
17224        #[allow(clippy::absurd_extreme_comparisons)]
17225        #[allow(unused_comparisons)]
17226        if __tmp.remaining() < Self::ENCODED_LEN {
17227            panic!(
17228                "buffer is too small (need {} bytes, but got {})",
17229                Self::ENCODED_LEN,
17230                __tmp.remaining(),
17231            )
17232        }
17233        __tmp.put_u64_le(self.time_usec);
17234        __tmp.put_f32_le(self.xacc);
17235        __tmp.put_f32_le(self.yacc);
17236        __tmp.put_f32_le(self.zacc);
17237        __tmp.put_f32_le(self.xgyro);
17238        __tmp.put_f32_le(self.ygyro);
17239        __tmp.put_f32_le(self.zgyro);
17240        __tmp.put_f32_le(self.xmag);
17241        __tmp.put_f32_le(self.ymag);
17242        __tmp.put_f32_le(self.zmag);
17243        __tmp.put_f32_le(self.abs_pressure);
17244        __tmp.put_f32_le(self.diff_pressure);
17245        __tmp.put_f32_le(self.pressure_alt);
17246        __tmp.put_f32_le(self.temperature);
17247        __tmp.put_u32_le(self.fields_updated.bits());
17248        if matches!(version, MavlinkVersion::V2) {
17249            __tmp.put_u8(self.id);
17250            let len = __tmp.len();
17251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17252        } else {
17253            __tmp.len()
17254        }
17255    }
17256}
17257#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17258#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17259#[doc = ""]
17260#[doc = "ID: 90"]
17261#[derive(Debug, Clone, PartialEq)]
17262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17264#[cfg_attr(feature = "ts", derive(TS))]
17265#[cfg_attr(feature = "ts", ts(export))]
17266pub struct HIL_STATE_DATA {
17267    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17268    pub time_usec: u64,
17269    #[doc = "Roll angle"]
17270    pub roll: f32,
17271    #[doc = "Pitch angle"]
17272    pub pitch: f32,
17273    #[doc = "Yaw angle"]
17274    pub yaw: f32,
17275    #[doc = "Body frame roll / phi angular speed"]
17276    pub rollspeed: f32,
17277    #[doc = "Body frame pitch / theta angular speed"]
17278    pub pitchspeed: f32,
17279    #[doc = "Body frame yaw / psi angular speed"]
17280    pub yawspeed: f32,
17281    #[doc = "Latitude"]
17282    pub lat: i32,
17283    #[doc = "Longitude"]
17284    pub lon: i32,
17285    #[doc = "Altitude"]
17286    pub alt: i32,
17287    #[doc = "Ground X Speed (Latitude)"]
17288    pub vx: i16,
17289    #[doc = "Ground Y Speed (Longitude)"]
17290    pub vy: i16,
17291    #[doc = "Ground Z Speed (Altitude)"]
17292    pub vz: i16,
17293    #[doc = "X acceleration"]
17294    pub xacc: i16,
17295    #[doc = "Y acceleration"]
17296    pub yacc: i16,
17297    #[doc = "Z acceleration"]
17298    pub zacc: i16,
17299}
17300impl HIL_STATE_DATA {
17301    pub const ENCODED_LEN: usize = 56usize;
17302    pub const DEFAULT: Self = Self {
17303        time_usec: 0_u64,
17304        roll: 0.0_f32,
17305        pitch: 0.0_f32,
17306        yaw: 0.0_f32,
17307        rollspeed: 0.0_f32,
17308        pitchspeed: 0.0_f32,
17309        yawspeed: 0.0_f32,
17310        lat: 0_i32,
17311        lon: 0_i32,
17312        alt: 0_i32,
17313        vx: 0_i16,
17314        vy: 0_i16,
17315        vz: 0_i16,
17316        xacc: 0_i16,
17317        yacc: 0_i16,
17318        zacc: 0_i16,
17319    };
17320    #[cfg(feature = "arbitrary")]
17321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17322        use arbitrary::{Arbitrary, Unstructured};
17323        let mut buf = [0u8; 1024];
17324        rng.fill_bytes(&mut buf);
17325        let mut unstructured = Unstructured::new(&buf);
17326        Self::arbitrary(&mut unstructured).unwrap_or_default()
17327    }
17328}
17329impl Default for HIL_STATE_DATA {
17330    fn default() -> Self {
17331        Self::DEFAULT.clone()
17332    }
17333}
17334impl MessageData for HIL_STATE_DATA {
17335    type Message = MavMessage;
17336    const ID: u32 = 90u32;
17337    const NAME: &'static str = "HIL_STATE";
17338    const EXTRA_CRC: u8 = 183u8;
17339    const ENCODED_LEN: usize = 56usize;
17340    fn deser(
17341        _version: MavlinkVersion,
17342        __input: &[u8],
17343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17344        let avail_len = __input.len();
17345        let mut payload_buf = [0; Self::ENCODED_LEN];
17346        let mut buf = if avail_len < Self::ENCODED_LEN {
17347            payload_buf[0..avail_len].copy_from_slice(__input);
17348            Bytes::new(&payload_buf)
17349        } else {
17350            Bytes::new(__input)
17351        };
17352        let mut __struct = Self::default();
17353        __struct.time_usec = buf.get_u64_le();
17354        __struct.roll = buf.get_f32_le();
17355        __struct.pitch = buf.get_f32_le();
17356        __struct.yaw = buf.get_f32_le();
17357        __struct.rollspeed = buf.get_f32_le();
17358        __struct.pitchspeed = buf.get_f32_le();
17359        __struct.yawspeed = buf.get_f32_le();
17360        __struct.lat = buf.get_i32_le();
17361        __struct.lon = buf.get_i32_le();
17362        __struct.alt = buf.get_i32_le();
17363        __struct.vx = buf.get_i16_le();
17364        __struct.vy = buf.get_i16_le();
17365        __struct.vz = buf.get_i16_le();
17366        __struct.xacc = buf.get_i16_le();
17367        __struct.yacc = buf.get_i16_le();
17368        __struct.zacc = buf.get_i16_le();
17369        Ok(__struct)
17370    }
17371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17372        let mut __tmp = BytesMut::new(bytes);
17373        #[allow(clippy::absurd_extreme_comparisons)]
17374        #[allow(unused_comparisons)]
17375        if __tmp.remaining() < Self::ENCODED_LEN {
17376            panic!(
17377                "buffer is too small (need {} bytes, but got {})",
17378                Self::ENCODED_LEN,
17379                __tmp.remaining(),
17380            )
17381        }
17382        __tmp.put_u64_le(self.time_usec);
17383        __tmp.put_f32_le(self.roll);
17384        __tmp.put_f32_le(self.pitch);
17385        __tmp.put_f32_le(self.yaw);
17386        __tmp.put_f32_le(self.rollspeed);
17387        __tmp.put_f32_le(self.pitchspeed);
17388        __tmp.put_f32_le(self.yawspeed);
17389        __tmp.put_i32_le(self.lat);
17390        __tmp.put_i32_le(self.lon);
17391        __tmp.put_i32_le(self.alt);
17392        __tmp.put_i16_le(self.vx);
17393        __tmp.put_i16_le(self.vy);
17394        __tmp.put_i16_le(self.vz);
17395        __tmp.put_i16_le(self.xacc);
17396        __tmp.put_i16_le(self.yacc);
17397        __tmp.put_i16_le(self.zacc);
17398        if matches!(version, MavlinkVersion::V2) {
17399            let len = __tmp.len();
17400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17401        } else {
17402            __tmp.len()
17403        }
17404    }
17405}
17406#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17407#[doc = ""]
17408#[doc = "ID: 115"]
17409#[derive(Debug, Clone, PartialEq)]
17410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17412#[cfg_attr(feature = "ts", derive(TS))]
17413#[cfg_attr(feature = "ts", ts(export))]
17414pub struct HIL_STATE_QUATERNION_DATA {
17415    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17416    pub time_usec: u64,
17417    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17418    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17419    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17420    pub attitude_quaternion: [f32; 4],
17421    #[doc = "Body frame roll / phi angular speed"]
17422    pub rollspeed: f32,
17423    #[doc = "Body frame pitch / theta angular speed"]
17424    pub pitchspeed: f32,
17425    #[doc = "Body frame yaw / psi angular speed"]
17426    pub yawspeed: f32,
17427    #[doc = "Latitude"]
17428    pub lat: i32,
17429    #[doc = "Longitude"]
17430    pub lon: i32,
17431    #[doc = "Altitude"]
17432    pub alt: i32,
17433    #[doc = "Ground X Speed (Latitude)"]
17434    pub vx: i16,
17435    #[doc = "Ground Y Speed (Longitude)"]
17436    pub vy: i16,
17437    #[doc = "Ground Z Speed (Altitude)"]
17438    pub vz: i16,
17439    #[doc = "Indicated airspeed"]
17440    pub ind_airspeed: u16,
17441    #[doc = "True airspeed"]
17442    pub true_airspeed: u16,
17443    #[doc = "X acceleration"]
17444    pub xacc: i16,
17445    #[doc = "Y acceleration"]
17446    pub yacc: i16,
17447    #[doc = "Z acceleration"]
17448    pub zacc: i16,
17449}
17450impl HIL_STATE_QUATERNION_DATA {
17451    pub const ENCODED_LEN: usize = 64usize;
17452    pub const DEFAULT: Self = Self {
17453        time_usec: 0_u64,
17454        attitude_quaternion: [0.0_f32; 4usize],
17455        rollspeed: 0.0_f32,
17456        pitchspeed: 0.0_f32,
17457        yawspeed: 0.0_f32,
17458        lat: 0_i32,
17459        lon: 0_i32,
17460        alt: 0_i32,
17461        vx: 0_i16,
17462        vy: 0_i16,
17463        vz: 0_i16,
17464        ind_airspeed: 0_u16,
17465        true_airspeed: 0_u16,
17466        xacc: 0_i16,
17467        yacc: 0_i16,
17468        zacc: 0_i16,
17469    };
17470    #[cfg(feature = "arbitrary")]
17471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17472        use arbitrary::{Arbitrary, Unstructured};
17473        let mut buf = [0u8; 1024];
17474        rng.fill_bytes(&mut buf);
17475        let mut unstructured = Unstructured::new(&buf);
17476        Self::arbitrary(&mut unstructured).unwrap_or_default()
17477    }
17478}
17479impl Default for HIL_STATE_QUATERNION_DATA {
17480    fn default() -> Self {
17481        Self::DEFAULT.clone()
17482    }
17483}
17484impl MessageData for HIL_STATE_QUATERNION_DATA {
17485    type Message = MavMessage;
17486    const ID: u32 = 115u32;
17487    const NAME: &'static str = "HIL_STATE_QUATERNION";
17488    const EXTRA_CRC: u8 = 4u8;
17489    const ENCODED_LEN: usize = 64usize;
17490    fn deser(
17491        _version: MavlinkVersion,
17492        __input: &[u8],
17493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17494        let avail_len = __input.len();
17495        let mut payload_buf = [0; Self::ENCODED_LEN];
17496        let mut buf = if avail_len < Self::ENCODED_LEN {
17497            payload_buf[0..avail_len].copy_from_slice(__input);
17498            Bytes::new(&payload_buf)
17499        } else {
17500            Bytes::new(__input)
17501        };
17502        let mut __struct = Self::default();
17503        __struct.time_usec = buf.get_u64_le();
17504        for v in &mut __struct.attitude_quaternion {
17505            let val = buf.get_f32_le();
17506            *v = val;
17507        }
17508        __struct.rollspeed = buf.get_f32_le();
17509        __struct.pitchspeed = buf.get_f32_le();
17510        __struct.yawspeed = buf.get_f32_le();
17511        __struct.lat = buf.get_i32_le();
17512        __struct.lon = buf.get_i32_le();
17513        __struct.alt = buf.get_i32_le();
17514        __struct.vx = buf.get_i16_le();
17515        __struct.vy = buf.get_i16_le();
17516        __struct.vz = buf.get_i16_le();
17517        __struct.ind_airspeed = buf.get_u16_le();
17518        __struct.true_airspeed = buf.get_u16_le();
17519        __struct.xacc = buf.get_i16_le();
17520        __struct.yacc = buf.get_i16_le();
17521        __struct.zacc = buf.get_i16_le();
17522        Ok(__struct)
17523    }
17524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17525        let mut __tmp = BytesMut::new(bytes);
17526        #[allow(clippy::absurd_extreme_comparisons)]
17527        #[allow(unused_comparisons)]
17528        if __tmp.remaining() < Self::ENCODED_LEN {
17529            panic!(
17530                "buffer is too small (need {} bytes, but got {})",
17531                Self::ENCODED_LEN,
17532                __tmp.remaining(),
17533            )
17534        }
17535        __tmp.put_u64_le(self.time_usec);
17536        for val in &self.attitude_quaternion {
17537            __tmp.put_f32_le(*val);
17538        }
17539        __tmp.put_f32_le(self.rollspeed);
17540        __tmp.put_f32_le(self.pitchspeed);
17541        __tmp.put_f32_le(self.yawspeed);
17542        __tmp.put_i32_le(self.lat);
17543        __tmp.put_i32_le(self.lon);
17544        __tmp.put_i32_le(self.alt);
17545        __tmp.put_i16_le(self.vx);
17546        __tmp.put_i16_le(self.vy);
17547        __tmp.put_i16_le(self.vz);
17548        __tmp.put_u16_le(self.ind_airspeed);
17549        __tmp.put_u16_le(self.true_airspeed);
17550        __tmp.put_i16_le(self.xacc);
17551        __tmp.put_i16_le(self.yacc);
17552        __tmp.put_i16_le(self.zacc);
17553        if matches!(version, MavlinkVersion::V2) {
17554            let len = __tmp.len();
17555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17556        } else {
17557            __tmp.len()
17558        }
17559    }
17560}
17561#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17562#[doc = ""]
17563#[doc = "ID: 242"]
17564#[derive(Debug, Clone, PartialEq)]
17565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17567#[cfg_attr(feature = "ts", derive(TS))]
17568#[cfg_attr(feature = "ts", ts(export))]
17569pub struct HOME_POSITION_DATA {
17570    #[doc = "Latitude (WGS84)"]
17571    pub latitude: i32,
17572    #[doc = "Longitude (WGS84)"]
17573    pub longitude: i32,
17574    #[doc = "Altitude (MSL). Positive for up."]
17575    pub altitude: i32,
17576    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17577    pub x: f32,
17578    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17579    pub y: f32,
17580    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17581    pub z: f32,
17582    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17584    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17585    pub q: [f32; 4],
17586    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17587    pub approach_x: f32,
17588    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17589    pub approach_y: f32,
17590    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17591    pub approach_z: f32,
17592    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17594    pub time_usec: u64,
17595}
17596impl HOME_POSITION_DATA {
17597    pub const ENCODED_LEN: usize = 60usize;
17598    pub const DEFAULT: Self = Self {
17599        latitude: 0_i32,
17600        longitude: 0_i32,
17601        altitude: 0_i32,
17602        x: 0.0_f32,
17603        y: 0.0_f32,
17604        z: 0.0_f32,
17605        q: [0.0_f32; 4usize],
17606        approach_x: 0.0_f32,
17607        approach_y: 0.0_f32,
17608        approach_z: 0.0_f32,
17609        time_usec: 0_u64,
17610    };
17611    #[cfg(feature = "arbitrary")]
17612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17613        use arbitrary::{Arbitrary, Unstructured};
17614        let mut buf = [0u8; 1024];
17615        rng.fill_bytes(&mut buf);
17616        let mut unstructured = Unstructured::new(&buf);
17617        Self::arbitrary(&mut unstructured).unwrap_or_default()
17618    }
17619}
17620impl Default for HOME_POSITION_DATA {
17621    fn default() -> Self {
17622        Self::DEFAULT.clone()
17623    }
17624}
17625impl MessageData for HOME_POSITION_DATA {
17626    type Message = MavMessage;
17627    const ID: u32 = 242u32;
17628    const NAME: &'static str = "HOME_POSITION";
17629    const EXTRA_CRC: u8 = 104u8;
17630    const ENCODED_LEN: usize = 60usize;
17631    fn deser(
17632        _version: MavlinkVersion,
17633        __input: &[u8],
17634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17635        let avail_len = __input.len();
17636        let mut payload_buf = [0; Self::ENCODED_LEN];
17637        let mut buf = if avail_len < Self::ENCODED_LEN {
17638            payload_buf[0..avail_len].copy_from_slice(__input);
17639            Bytes::new(&payload_buf)
17640        } else {
17641            Bytes::new(__input)
17642        };
17643        let mut __struct = Self::default();
17644        __struct.latitude = buf.get_i32_le();
17645        __struct.longitude = buf.get_i32_le();
17646        __struct.altitude = buf.get_i32_le();
17647        __struct.x = buf.get_f32_le();
17648        __struct.y = buf.get_f32_le();
17649        __struct.z = buf.get_f32_le();
17650        for v in &mut __struct.q {
17651            let val = buf.get_f32_le();
17652            *v = val;
17653        }
17654        __struct.approach_x = buf.get_f32_le();
17655        __struct.approach_y = buf.get_f32_le();
17656        __struct.approach_z = buf.get_f32_le();
17657        __struct.time_usec = buf.get_u64_le();
17658        Ok(__struct)
17659    }
17660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17661        let mut __tmp = BytesMut::new(bytes);
17662        #[allow(clippy::absurd_extreme_comparisons)]
17663        #[allow(unused_comparisons)]
17664        if __tmp.remaining() < Self::ENCODED_LEN {
17665            panic!(
17666                "buffer is too small (need {} bytes, but got {})",
17667                Self::ENCODED_LEN,
17668                __tmp.remaining(),
17669            )
17670        }
17671        __tmp.put_i32_le(self.latitude);
17672        __tmp.put_i32_le(self.longitude);
17673        __tmp.put_i32_le(self.altitude);
17674        __tmp.put_f32_le(self.x);
17675        __tmp.put_f32_le(self.y);
17676        __tmp.put_f32_le(self.z);
17677        for val in &self.q {
17678            __tmp.put_f32_le(*val);
17679        }
17680        __tmp.put_f32_le(self.approach_x);
17681        __tmp.put_f32_le(self.approach_y);
17682        __tmp.put_f32_le(self.approach_z);
17683        if matches!(version, MavlinkVersion::V2) {
17684            __tmp.put_u64_le(self.time_usec);
17685            let len = __tmp.len();
17686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17687        } else {
17688            __tmp.len()
17689        }
17690    }
17691}
17692#[doc = "Temperature and humidity from hygrometer."]
17693#[doc = ""]
17694#[doc = "ID: 12920"]
17695#[derive(Debug, Clone, PartialEq)]
17696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17698#[cfg_attr(feature = "ts", derive(TS))]
17699#[cfg_attr(feature = "ts", ts(export))]
17700pub struct HYGROMETER_SENSOR_DATA {
17701    #[doc = "Temperature"]
17702    pub temperature: i16,
17703    #[doc = "Humidity"]
17704    pub humidity: u16,
17705    #[doc = "Hygrometer ID"]
17706    pub id: u8,
17707}
17708impl HYGROMETER_SENSOR_DATA {
17709    pub const ENCODED_LEN: usize = 5usize;
17710    pub const DEFAULT: Self = Self {
17711        temperature: 0_i16,
17712        humidity: 0_u16,
17713        id: 0_u8,
17714    };
17715    #[cfg(feature = "arbitrary")]
17716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17717        use arbitrary::{Arbitrary, Unstructured};
17718        let mut buf = [0u8; 1024];
17719        rng.fill_bytes(&mut buf);
17720        let mut unstructured = Unstructured::new(&buf);
17721        Self::arbitrary(&mut unstructured).unwrap_or_default()
17722    }
17723}
17724impl Default for HYGROMETER_SENSOR_DATA {
17725    fn default() -> Self {
17726        Self::DEFAULT.clone()
17727    }
17728}
17729impl MessageData for HYGROMETER_SENSOR_DATA {
17730    type Message = MavMessage;
17731    const ID: u32 = 12920u32;
17732    const NAME: &'static str = "HYGROMETER_SENSOR";
17733    const EXTRA_CRC: u8 = 20u8;
17734    const ENCODED_LEN: usize = 5usize;
17735    fn deser(
17736        _version: MavlinkVersion,
17737        __input: &[u8],
17738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17739        let avail_len = __input.len();
17740        let mut payload_buf = [0; Self::ENCODED_LEN];
17741        let mut buf = if avail_len < Self::ENCODED_LEN {
17742            payload_buf[0..avail_len].copy_from_slice(__input);
17743            Bytes::new(&payload_buf)
17744        } else {
17745            Bytes::new(__input)
17746        };
17747        let mut __struct = Self::default();
17748        __struct.temperature = buf.get_i16_le();
17749        __struct.humidity = buf.get_u16_le();
17750        __struct.id = buf.get_u8();
17751        Ok(__struct)
17752    }
17753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17754        let mut __tmp = BytesMut::new(bytes);
17755        #[allow(clippy::absurd_extreme_comparisons)]
17756        #[allow(unused_comparisons)]
17757        if __tmp.remaining() < Self::ENCODED_LEN {
17758            panic!(
17759                "buffer is too small (need {} bytes, but got {})",
17760                Self::ENCODED_LEN,
17761                __tmp.remaining(),
17762            )
17763        }
17764        __tmp.put_i16_le(self.temperature);
17765        __tmp.put_u16_le(self.humidity);
17766        __tmp.put_u8(self.id);
17767        if matches!(version, MavlinkVersion::V2) {
17768            let len = __tmp.len();
17769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17770        } else {
17771            __tmp.len()
17772        }
17773    }
17774}
17775#[doc = "Illuminator status."]
17776#[doc = ""]
17777#[doc = "ID: 440"]
17778#[derive(Debug, Clone, PartialEq)]
17779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17781#[cfg_attr(feature = "ts", derive(TS))]
17782#[cfg_attr(feature = "ts", ts(export))]
17783pub struct ILLUMINATOR_STATUS_DATA {
17784    #[doc = "Time since the start-up of the illuminator in ms"]
17785    pub uptime_ms: u32,
17786    #[doc = "Errors"]
17787    pub error_status: IlluminatorErrorFlags,
17788    #[doc = "Illuminator brightness"]
17789    pub brightness: f32,
17790    #[doc = "Illuminator strobing period in seconds"]
17791    pub strobe_period: f32,
17792    #[doc = "Illuminator strobing duty cycle"]
17793    pub strobe_duty_cycle: f32,
17794    #[doc = "Temperature in Celsius"]
17795    pub temp_c: f32,
17796    #[doc = "Minimum strobing period in seconds"]
17797    pub min_strobe_period: f32,
17798    #[doc = "Maximum strobing period in seconds"]
17799    pub max_strobe_period: f32,
17800    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17801    pub enable: u8,
17802    #[doc = "Supported illuminator modes"]
17803    pub mode_bitmask: IlluminatorMode,
17804    #[doc = "Illuminator mode"]
17805    pub mode: IlluminatorMode,
17806}
17807impl ILLUMINATOR_STATUS_DATA {
17808    pub const ENCODED_LEN: usize = 35usize;
17809    pub const DEFAULT: Self = Self {
17810        uptime_ms: 0_u32,
17811        error_status: IlluminatorErrorFlags::DEFAULT,
17812        brightness: 0.0_f32,
17813        strobe_period: 0.0_f32,
17814        strobe_duty_cycle: 0.0_f32,
17815        temp_c: 0.0_f32,
17816        min_strobe_period: 0.0_f32,
17817        max_strobe_period: 0.0_f32,
17818        enable: 0_u8,
17819        mode_bitmask: IlluminatorMode::DEFAULT,
17820        mode: IlluminatorMode::DEFAULT,
17821    };
17822    #[cfg(feature = "arbitrary")]
17823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17824        use arbitrary::{Arbitrary, Unstructured};
17825        let mut buf = [0u8; 1024];
17826        rng.fill_bytes(&mut buf);
17827        let mut unstructured = Unstructured::new(&buf);
17828        Self::arbitrary(&mut unstructured).unwrap_or_default()
17829    }
17830}
17831impl Default for ILLUMINATOR_STATUS_DATA {
17832    fn default() -> Self {
17833        Self::DEFAULT.clone()
17834    }
17835}
17836impl MessageData for ILLUMINATOR_STATUS_DATA {
17837    type Message = MavMessage;
17838    const ID: u32 = 440u32;
17839    const NAME: &'static str = "ILLUMINATOR_STATUS";
17840    const EXTRA_CRC: u8 = 66u8;
17841    const ENCODED_LEN: usize = 35usize;
17842    fn deser(
17843        _version: MavlinkVersion,
17844        __input: &[u8],
17845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17846        let avail_len = __input.len();
17847        let mut payload_buf = [0; Self::ENCODED_LEN];
17848        let mut buf = if avail_len < Self::ENCODED_LEN {
17849            payload_buf[0..avail_len].copy_from_slice(__input);
17850            Bytes::new(&payload_buf)
17851        } else {
17852            Bytes::new(__input)
17853        };
17854        let mut __struct = Self::default();
17855        __struct.uptime_ms = buf.get_u32_le();
17856        let tmp = buf.get_u32_le();
17857        __struct.error_status = IlluminatorErrorFlags::from_bits(
17858            tmp & IlluminatorErrorFlags::all().bits(),
17859        )
17860        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17861            flag_type: "IlluminatorErrorFlags",
17862            value: tmp as u32,
17863        })?;
17864        __struct.brightness = buf.get_f32_le();
17865        __struct.strobe_period = buf.get_f32_le();
17866        __struct.strobe_duty_cycle = buf.get_f32_le();
17867        __struct.temp_c = buf.get_f32_le();
17868        __struct.min_strobe_period = buf.get_f32_le();
17869        __struct.max_strobe_period = buf.get_f32_le();
17870        __struct.enable = buf.get_u8();
17871        let tmp = buf.get_u8();
17872        __struct.mode_bitmask =
17873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17874                enum_type: "IlluminatorMode",
17875                value: tmp as u32,
17876            })?;
17877        let tmp = buf.get_u8();
17878        __struct.mode =
17879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17880                enum_type: "IlluminatorMode",
17881                value: tmp as u32,
17882            })?;
17883        Ok(__struct)
17884    }
17885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17886        let mut __tmp = BytesMut::new(bytes);
17887        #[allow(clippy::absurd_extreme_comparisons)]
17888        #[allow(unused_comparisons)]
17889        if __tmp.remaining() < Self::ENCODED_LEN {
17890            panic!(
17891                "buffer is too small (need {} bytes, but got {})",
17892                Self::ENCODED_LEN,
17893                __tmp.remaining(),
17894            )
17895        }
17896        __tmp.put_u32_le(self.uptime_ms);
17897        __tmp.put_u32_le(self.error_status.bits());
17898        __tmp.put_f32_le(self.brightness);
17899        __tmp.put_f32_le(self.strobe_period);
17900        __tmp.put_f32_le(self.strobe_duty_cycle);
17901        __tmp.put_f32_le(self.temp_c);
17902        __tmp.put_f32_le(self.min_strobe_period);
17903        __tmp.put_f32_le(self.max_strobe_period);
17904        __tmp.put_u8(self.enable);
17905        __tmp.put_u8(self.mode_bitmask as u8);
17906        __tmp.put_u8(self.mode as u8);
17907        if matches!(version, MavlinkVersion::V2) {
17908            let len = __tmp.len();
17909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17910        } else {
17911            __tmp.len()
17912        }
17913    }
17914}
17915#[doc = "Status of the Iridium SBD link."]
17916#[doc = ""]
17917#[doc = "ID: 335"]
17918#[derive(Debug, Clone, PartialEq)]
17919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17921#[cfg_attr(feature = "ts", derive(TS))]
17922#[cfg_attr(feature = "ts", ts(export))]
17923pub struct ISBD_LINK_STATUS_DATA {
17924    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17925    pub timestamp: u64,
17926    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17927    pub last_heartbeat: u64,
17928    #[doc = "Number of failed SBD sessions."]
17929    pub failed_sessions: u16,
17930    #[doc = "Number of successful SBD sessions."]
17931    pub successful_sessions: u16,
17932    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17933    pub signal_quality: u8,
17934    #[doc = "1: Ring call pending, 0: No call pending."]
17935    pub ring_pending: u8,
17936    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17937    pub tx_session_pending: u8,
17938    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17939    pub rx_session_pending: u8,
17940}
17941impl ISBD_LINK_STATUS_DATA {
17942    pub const ENCODED_LEN: usize = 24usize;
17943    pub const DEFAULT: Self = Self {
17944        timestamp: 0_u64,
17945        last_heartbeat: 0_u64,
17946        failed_sessions: 0_u16,
17947        successful_sessions: 0_u16,
17948        signal_quality: 0_u8,
17949        ring_pending: 0_u8,
17950        tx_session_pending: 0_u8,
17951        rx_session_pending: 0_u8,
17952    };
17953    #[cfg(feature = "arbitrary")]
17954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17955        use arbitrary::{Arbitrary, Unstructured};
17956        let mut buf = [0u8; 1024];
17957        rng.fill_bytes(&mut buf);
17958        let mut unstructured = Unstructured::new(&buf);
17959        Self::arbitrary(&mut unstructured).unwrap_or_default()
17960    }
17961}
17962impl Default for ISBD_LINK_STATUS_DATA {
17963    fn default() -> Self {
17964        Self::DEFAULT.clone()
17965    }
17966}
17967impl MessageData for ISBD_LINK_STATUS_DATA {
17968    type Message = MavMessage;
17969    const ID: u32 = 335u32;
17970    const NAME: &'static str = "ISBD_LINK_STATUS";
17971    const EXTRA_CRC: u8 = 225u8;
17972    const ENCODED_LEN: usize = 24usize;
17973    fn deser(
17974        _version: MavlinkVersion,
17975        __input: &[u8],
17976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17977        let avail_len = __input.len();
17978        let mut payload_buf = [0; Self::ENCODED_LEN];
17979        let mut buf = if avail_len < Self::ENCODED_LEN {
17980            payload_buf[0..avail_len].copy_from_slice(__input);
17981            Bytes::new(&payload_buf)
17982        } else {
17983            Bytes::new(__input)
17984        };
17985        let mut __struct = Self::default();
17986        __struct.timestamp = buf.get_u64_le();
17987        __struct.last_heartbeat = buf.get_u64_le();
17988        __struct.failed_sessions = buf.get_u16_le();
17989        __struct.successful_sessions = buf.get_u16_le();
17990        __struct.signal_quality = buf.get_u8();
17991        __struct.ring_pending = buf.get_u8();
17992        __struct.tx_session_pending = buf.get_u8();
17993        __struct.rx_session_pending = buf.get_u8();
17994        Ok(__struct)
17995    }
17996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17997        let mut __tmp = BytesMut::new(bytes);
17998        #[allow(clippy::absurd_extreme_comparisons)]
17999        #[allow(unused_comparisons)]
18000        if __tmp.remaining() < Self::ENCODED_LEN {
18001            panic!(
18002                "buffer is too small (need {} bytes, but got {})",
18003                Self::ENCODED_LEN,
18004                __tmp.remaining(),
18005            )
18006        }
18007        __tmp.put_u64_le(self.timestamp);
18008        __tmp.put_u64_le(self.last_heartbeat);
18009        __tmp.put_u16_le(self.failed_sessions);
18010        __tmp.put_u16_le(self.successful_sessions);
18011        __tmp.put_u8(self.signal_quality);
18012        __tmp.put_u8(self.ring_pending);
18013        __tmp.put_u8(self.tx_session_pending);
18014        __tmp.put_u8(self.rx_session_pending);
18015        if matches!(version, MavlinkVersion::V2) {
18016            let len = __tmp.len();
18017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18018        } else {
18019            __tmp.len()
18020        }
18021    }
18022}
18023#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18024#[doc = ""]
18025#[doc = "ID: 149"]
18026#[derive(Debug, Clone, PartialEq)]
18027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18029#[cfg_attr(feature = "ts", derive(TS))]
18030#[cfg_attr(feature = "ts", ts(export))]
18031pub struct LANDING_TARGET_DATA {
18032    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18033    pub time_usec: u64,
18034    #[doc = "X-axis angular offset of the target from the center of the image"]
18035    pub angle_x: f32,
18036    #[doc = "Y-axis angular offset of the target from the center of the image"]
18037    pub angle_y: f32,
18038    #[doc = "Distance to the target from the vehicle"]
18039    pub distance: f32,
18040    #[doc = "Size of target along x-axis"]
18041    pub size_x: f32,
18042    #[doc = "Size of target along y-axis"]
18043    pub size_y: f32,
18044    #[doc = "The ID of the target if multiple targets are present"]
18045    pub target_num: u8,
18046    #[doc = "Coordinate frame used for following fields."]
18047    pub frame: MavFrame,
18048    #[doc = "X Position of the landing target in MAV_FRAME"]
18049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18050    pub x: f32,
18051    #[doc = "Y Position of the landing target in MAV_FRAME"]
18052    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18053    pub y: f32,
18054    #[doc = "Z Position of the landing target in MAV_FRAME"]
18055    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18056    pub z: f32,
18057    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18058    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18059    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18060    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18061    pub q: [f32; 4],
18062    #[doc = "Type of landing target"]
18063    #[cfg_attr(feature = "serde", serde(default))]
18064    pub mavtype: LandingTargetType,
18065    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18067    pub position_valid: u8,
18068}
18069impl LANDING_TARGET_DATA {
18070    pub const ENCODED_LEN: usize = 60usize;
18071    pub const DEFAULT: Self = Self {
18072        time_usec: 0_u64,
18073        angle_x: 0.0_f32,
18074        angle_y: 0.0_f32,
18075        distance: 0.0_f32,
18076        size_x: 0.0_f32,
18077        size_y: 0.0_f32,
18078        target_num: 0_u8,
18079        frame: MavFrame::DEFAULT,
18080        x: 0.0_f32,
18081        y: 0.0_f32,
18082        z: 0.0_f32,
18083        q: [0.0_f32; 4usize],
18084        mavtype: LandingTargetType::DEFAULT,
18085        position_valid: 0_u8,
18086    };
18087    #[cfg(feature = "arbitrary")]
18088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18089        use arbitrary::{Arbitrary, Unstructured};
18090        let mut buf = [0u8; 1024];
18091        rng.fill_bytes(&mut buf);
18092        let mut unstructured = Unstructured::new(&buf);
18093        Self::arbitrary(&mut unstructured).unwrap_or_default()
18094    }
18095}
18096impl Default for LANDING_TARGET_DATA {
18097    fn default() -> Self {
18098        Self::DEFAULT.clone()
18099    }
18100}
18101impl MessageData for LANDING_TARGET_DATA {
18102    type Message = MavMessage;
18103    const ID: u32 = 149u32;
18104    const NAME: &'static str = "LANDING_TARGET";
18105    const EXTRA_CRC: u8 = 200u8;
18106    const ENCODED_LEN: usize = 60usize;
18107    fn deser(
18108        _version: MavlinkVersion,
18109        __input: &[u8],
18110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18111        let avail_len = __input.len();
18112        let mut payload_buf = [0; Self::ENCODED_LEN];
18113        let mut buf = if avail_len < Self::ENCODED_LEN {
18114            payload_buf[0..avail_len].copy_from_slice(__input);
18115            Bytes::new(&payload_buf)
18116        } else {
18117            Bytes::new(__input)
18118        };
18119        let mut __struct = Self::default();
18120        __struct.time_usec = buf.get_u64_le();
18121        __struct.angle_x = buf.get_f32_le();
18122        __struct.angle_y = buf.get_f32_le();
18123        __struct.distance = buf.get_f32_le();
18124        __struct.size_x = buf.get_f32_le();
18125        __struct.size_y = buf.get_f32_le();
18126        __struct.target_num = buf.get_u8();
18127        let tmp = buf.get_u8();
18128        __struct.frame =
18129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18130                enum_type: "MavFrame",
18131                value: tmp as u32,
18132            })?;
18133        __struct.x = buf.get_f32_le();
18134        __struct.y = buf.get_f32_le();
18135        __struct.z = buf.get_f32_le();
18136        for v in &mut __struct.q {
18137            let val = buf.get_f32_le();
18138            *v = val;
18139        }
18140        let tmp = buf.get_u8();
18141        __struct.mavtype =
18142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18143                enum_type: "LandingTargetType",
18144                value: tmp as u32,
18145            })?;
18146        __struct.position_valid = buf.get_u8();
18147        Ok(__struct)
18148    }
18149    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18150        let mut __tmp = BytesMut::new(bytes);
18151        #[allow(clippy::absurd_extreme_comparisons)]
18152        #[allow(unused_comparisons)]
18153        if __tmp.remaining() < Self::ENCODED_LEN {
18154            panic!(
18155                "buffer is too small (need {} bytes, but got {})",
18156                Self::ENCODED_LEN,
18157                __tmp.remaining(),
18158            )
18159        }
18160        __tmp.put_u64_le(self.time_usec);
18161        __tmp.put_f32_le(self.angle_x);
18162        __tmp.put_f32_le(self.angle_y);
18163        __tmp.put_f32_le(self.distance);
18164        __tmp.put_f32_le(self.size_x);
18165        __tmp.put_f32_le(self.size_y);
18166        __tmp.put_u8(self.target_num);
18167        __tmp.put_u8(self.frame as u8);
18168        if matches!(version, MavlinkVersion::V2) {
18169            __tmp.put_f32_le(self.x);
18170            __tmp.put_f32_le(self.y);
18171            __tmp.put_f32_le(self.z);
18172            for val in &self.q {
18173                __tmp.put_f32_le(*val);
18174            }
18175            __tmp.put_u8(self.mavtype as u8);
18176            __tmp.put_u8(self.position_valid);
18177            let len = __tmp.len();
18178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18179        } else {
18180            __tmp.len()
18181        }
18182    }
18183}
18184#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18185#[doc = ""]
18186#[doc = "ID: 8"]
18187#[derive(Debug, Clone, PartialEq)]
18188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18190#[cfg_attr(feature = "ts", derive(TS))]
18191#[cfg_attr(feature = "ts", ts(export))]
18192pub struct LINK_NODE_STATUS_DATA {
18193    #[doc = "Timestamp (time since system boot)."]
18194    pub timestamp: u64,
18195    #[doc = "Transmit rate"]
18196    pub tx_rate: u32,
18197    #[doc = "Receive rate"]
18198    pub rx_rate: u32,
18199    #[doc = "Messages sent"]
18200    pub messages_sent: u32,
18201    #[doc = "Messages received (estimated from counting seq)"]
18202    pub messages_received: u32,
18203    #[doc = "Messages lost (estimated from counting seq)"]
18204    pub messages_lost: u32,
18205    #[doc = "Number of bytes that could not be parsed correctly."]
18206    pub rx_parse_err: u16,
18207    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18208    pub tx_overflows: u16,
18209    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18210    pub rx_overflows: u16,
18211    #[doc = "Remaining free transmit buffer space"]
18212    pub tx_buf: u8,
18213    #[doc = "Remaining free receive buffer space"]
18214    pub rx_buf: u8,
18215}
18216impl LINK_NODE_STATUS_DATA {
18217    pub const ENCODED_LEN: usize = 36usize;
18218    pub const DEFAULT: Self = Self {
18219        timestamp: 0_u64,
18220        tx_rate: 0_u32,
18221        rx_rate: 0_u32,
18222        messages_sent: 0_u32,
18223        messages_received: 0_u32,
18224        messages_lost: 0_u32,
18225        rx_parse_err: 0_u16,
18226        tx_overflows: 0_u16,
18227        rx_overflows: 0_u16,
18228        tx_buf: 0_u8,
18229        rx_buf: 0_u8,
18230    };
18231    #[cfg(feature = "arbitrary")]
18232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18233        use arbitrary::{Arbitrary, Unstructured};
18234        let mut buf = [0u8; 1024];
18235        rng.fill_bytes(&mut buf);
18236        let mut unstructured = Unstructured::new(&buf);
18237        Self::arbitrary(&mut unstructured).unwrap_or_default()
18238    }
18239}
18240impl Default for LINK_NODE_STATUS_DATA {
18241    fn default() -> Self {
18242        Self::DEFAULT.clone()
18243    }
18244}
18245impl MessageData for LINK_NODE_STATUS_DATA {
18246    type Message = MavMessage;
18247    const ID: u32 = 8u32;
18248    const NAME: &'static str = "LINK_NODE_STATUS";
18249    const EXTRA_CRC: u8 = 117u8;
18250    const ENCODED_LEN: usize = 36usize;
18251    fn deser(
18252        _version: MavlinkVersion,
18253        __input: &[u8],
18254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18255        let avail_len = __input.len();
18256        let mut payload_buf = [0; Self::ENCODED_LEN];
18257        let mut buf = if avail_len < Self::ENCODED_LEN {
18258            payload_buf[0..avail_len].copy_from_slice(__input);
18259            Bytes::new(&payload_buf)
18260        } else {
18261            Bytes::new(__input)
18262        };
18263        let mut __struct = Self::default();
18264        __struct.timestamp = buf.get_u64_le();
18265        __struct.tx_rate = buf.get_u32_le();
18266        __struct.rx_rate = buf.get_u32_le();
18267        __struct.messages_sent = buf.get_u32_le();
18268        __struct.messages_received = buf.get_u32_le();
18269        __struct.messages_lost = buf.get_u32_le();
18270        __struct.rx_parse_err = buf.get_u16_le();
18271        __struct.tx_overflows = buf.get_u16_le();
18272        __struct.rx_overflows = buf.get_u16_le();
18273        __struct.tx_buf = buf.get_u8();
18274        __struct.rx_buf = buf.get_u8();
18275        Ok(__struct)
18276    }
18277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18278        let mut __tmp = BytesMut::new(bytes);
18279        #[allow(clippy::absurd_extreme_comparisons)]
18280        #[allow(unused_comparisons)]
18281        if __tmp.remaining() < Self::ENCODED_LEN {
18282            panic!(
18283                "buffer is too small (need {} bytes, but got {})",
18284                Self::ENCODED_LEN,
18285                __tmp.remaining(),
18286            )
18287        }
18288        __tmp.put_u64_le(self.timestamp);
18289        __tmp.put_u32_le(self.tx_rate);
18290        __tmp.put_u32_le(self.rx_rate);
18291        __tmp.put_u32_le(self.messages_sent);
18292        __tmp.put_u32_le(self.messages_received);
18293        __tmp.put_u32_le(self.messages_lost);
18294        __tmp.put_u16_le(self.rx_parse_err);
18295        __tmp.put_u16_le(self.tx_overflows);
18296        __tmp.put_u16_le(self.rx_overflows);
18297        __tmp.put_u8(self.tx_buf);
18298        __tmp.put_u8(self.rx_buf);
18299        if matches!(version, MavlinkVersion::V2) {
18300            let len = __tmp.len();
18301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18302        } else {
18303            __tmp.len()
18304        }
18305    }
18306}
18307#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18308#[doc = ""]
18309#[doc = "ID: 32"]
18310#[derive(Debug, Clone, PartialEq)]
18311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18313#[cfg_attr(feature = "ts", derive(TS))]
18314#[cfg_attr(feature = "ts", ts(export))]
18315pub struct LOCAL_POSITION_NED_DATA {
18316    #[doc = "Timestamp (time since system boot)."]
18317    pub time_boot_ms: u32,
18318    #[doc = "X Position"]
18319    pub x: f32,
18320    #[doc = "Y Position"]
18321    pub y: f32,
18322    #[doc = "Z Position"]
18323    pub z: f32,
18324    #[doc = "X Speed"]
18325    pub vx: f32,
18326    #[doc = "Y Speed"]
18327    pub vy: f32,
18328    #[doc = "Z Speed"]
18329    pub vz: f32,
18330}
18331impl LOCAL_POSITION_NED_DATA {
18332    pub const ENCODED_LEN: usize = 28usize;
18333    pub const DEFAULT: Self = Self {
18334        time_boot_ms: 0_u32,
18335        x: 0.0_f32,
18336        y: 0.0_f32,
18337        z: 0.0_f32,
18338        vx: 0.0_f32,
18339        vy: 0.0_f32,
18340        vz: 0.0_f32,
18341    };
18342    #[cfg(feature = "arbitrary")]
18343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18344        use arbitrary::{Arbitrary, Unstructured};
18345        let mut buf = [0u8; 1024];
18346        rng.fill_bytes(&mut buf);
18347        let mut unstructured = Unstructured::new(&buf);
18348        Self::arbitrary(&mut unstructured).unwrap_or_default()
18349    }
18350}
18351impl Default for LOCAL_POSITION_NED_DATA {
18352    fn default() -> Self {
18353        Self::DEFAULT.clone()
18354    }
18355}
18356impl MessageData for LOCAL_POSITION_NED_DATA {
18357    type Message = MavMessage;
18358    const ID: u32 = 32u32;
18359    const NAME: &'static str = "LOCAL_POSITION_NED";
18360    const EXTRA_CRC: u8 = 185u8;
18361    const ENCODED_LEN: usize = 28usize;
18362    fn deser(
18363        _version: MavlinkVersion,
18364        __input: &[u8],
18365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18366        let avail_len = __input.len();
18367        let mut payload_buf = [0; Self::ENCODED_LEN];
18368        let mut buf = if avail_len < Self::ENCODED_LEN {
18369            payload_buf[0..avail_len].copy_from_slice(__input);
18370            Bytes::new(&payload_buf)
18371        } else {
18372            Bytes::new(__input)
18373        };
18374        let mut __struct = Self::default();
18375        __struct.time_boot_ms = buf.get_u32_le();
18376        __struct.x = buf.get_f32_le();
18377        __struct.y = buf.get_f32_le();
18378        __struct.z = buf.get_f32_le();
18379        __struct.vx = buf.get_f32_le();
18380        __struct.vy = buf.get_f32_le();
18381        __struct.vz = buf.get_f32_le();
18382        Ok(__struct)
18383    }
18384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18385        let mut __tmp = BytesMut::new(bytes);
18386        #[allow(clippy::absurd_extreme_comparisons)]
18387        #[allow(unused_comparisons)]
18388        if __tmp.remaining() < Self::ENCODED_LEN {
18389            panic!(
18390                "buffer is too small (need {} bytes, but got {})",
18391                Self::ENCODED_LEN,
18392                __tmp.remaining(),
18393            )
18394        }
18395        __tmp.put_u32_le(self.time_boot_ms);
18396        __tmp.put_f32_le(self.x);
18397        __tmp.put_f32_le(self.y);
18398        __tmp.put_f32_le(self.z);
18399        __tmp.put_f32_le(self.vx);
18400        __tmp.put_f32_le(self.vy);
18401        __tmp.put_f32_le(self.vz);
18402        if matches!(version, MavlinkVersion::V2) {
18403            let len = __tmp.len();
18404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18405        } else {
18406            __tmp.len()
18407        }
18408    }
18409}
18410#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18411#[doc = ""]
18412#[doc = "ID: 64"]
18413#[derive(Debug, Clone, PartialEq)]
18414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18416#[cfg_attr(feature = "ts", derive(TS))]
18417#[cfg_attr(feature = "ts", ts(export))]
18418pub struct LOCAL_POSITION_NED_COV_DATA {
18419    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18420    pub time_usec: u64,
18421    #[doc = "X Position"]
18422    pub x: f32,
18423    #[doc = "Y Position"]
18424    pub y: f32,
18425    #[doc = "Z Position"]
18426    pub z: f32,
18427    #[doc = "X Speed"]
18428    pub vx: f32,
18429    #[doc = "Y Speed"]
18430    pub vy: f32,
18431    #[doc = "Z Speed"]
18432    pub vz: f32,
18433    #[doc = "X Acceleration"]
18434    pub ax: f32,
18435    #[doc = "Y Acceleration"]
18436    pub ay: f32,
18437    #[doc = "Z Acceleration"]
18438    pub az: f32,
18439    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18442    pub covariance: [f32; 45],
18443    #[doc = "Class id of the estimator this estimate originated from."]
18444    pub estimator_type: MavEstimatorType,
18445}
18446impl LOCAL_POSITION_NED_COV_DATA {
18447    pub const ENCODED_LEN: usize = 225usize;
18448    pub const DEFAULT: Self = Self {
18449        time_usec: 0_u64,
18450        x: 0.0_f32,
18451        y: 0.0_f32,
18452        z: 0.0_f32,
18453        vx: 0.0_f32,
18454        vy: 0.0_f32,
18455        vz: 0.0_f32,
18456        ax: 0.0_f32,
18457        ay: 0.0_f32,
18458        az: 0.0_f32,
18459        covariance: [0.0_f32; 45usize],
18460        estimator_type: MavEstimatorType::DEFAULT,
18461    };
18462    #[cfg(feature = "arbitrary")]
18463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18464        use arbitrary::{Arbitrary, Unstructured};
18465        let mut buf = [0u8; 1024];
18466        rng.fill_bytes(&mut buf);
18467        let mut unstructured = Unstructured::new(&buf);
18468        Self::arbitrary(&mut unstructured).unwrap_or_default()
18469    }
18470}
18471impl Default for LOCAL_POSITION_NED_COV_DATA {
18472    fn default() -> Self {
18473        Self::DEFAULT.clone()
18474    }
18475}
18476impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18477    type Message = MavMessage;
18478    const ID: u32 = 64u32;
18479    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18480    const EXTRA_CRC: u8 = 191u8;
18481    const ENCODED_LEN: usize = 225usize;
18482    fn deser(
18483        _version: MavlinkVersion,
18484        __input: &[u8],
18485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18486        let avail_len = __input.len();
18487        let mut payload_buf = [0; Self::ENCODED_LEN];
18488        let mut buf = if avail_len < Self::ENCODED_LEN {
18489            payload_buf[0..avail_len].copy_from_slice(__input);
18490            Bytes::new(&payload_buf)
18491        } else {
18492            Bytes::new(__input)
18493        };
18494        let mut __struct = Self::default();
18495        __struct.time_usec = buf.get_u64_le();
18496        __struct.x = buf.get_f32_le();
18497        __struct.y = buf.get_f32_le();
18498        __struct.z = buf.get_f32_le();
18499        __struct.vx = buf.get_f32_le();
18500        __struct.vy = buf.get_f32_le();
18501        __struct.vz = buf.get_f32_le();
18502        __struct.ax = buf.get_f32_le();
18503        __struct.ay = buf.get_f32_le();
18504        __struct.az = buf.get_f32_le();
18505        for v in &mut __struct.covariance {
18506            let val = buf.get_f32_le();
18507            *v = val;
18508        }
18509        let tmp = buf.get_u8();
18510        __struct.estimator_type =
18511            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18512                enum_type: "MavEstimatorType",
18513                value: tmp as u32,
18514            })?;
18515        Ok(__struct)
18516    }
18517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18518        let mut __tmp = BytesMut::new(bytes);
18519        #[allow(clippy::absurd_extreme_comparisons)]
18520        #[allow(unused_comparisons)]
18521        if __tmp.remaining() < Self::ENCODED_LEN {
18522            panic!(
18523                "buffer is too small (need {} bytes, but got {})",
18524                Self::ENCODED_LEN,
18525                __tmp.remaining(),
18526            )
18527        }
18528        __tmp.put_u64_le(self.time_usec);
18529        __tmp.put_f32_le(self.x);
18530        __tmp.put_f32_le(self.y);
18531        __tmp.put_f32_le(self.z);
18532        __tmp.put_f32_le(self.vx);
18533        __tmp.put_f32_le(self.vy);
18534        __tmp.put_f32_le(self.vz);
18535        __tmp.put_f32_le(self.ax);
18536        __tmp.put_f32_le(self.ay);
18537        __tmp.put_f32_le(self.az);
18538        for val in &self.covariance {
18539            __tmp.put_f32_le(*val);
18540        }
18541        __tmp.put_u8(self.estimator_type as u8);
18542        if matches!(version, MavlinkVersion::V2) {
18543            let len = __tmp.len();
18544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18545        } else {
18546            __tmp.len()
18547        }
18548    }
18549}
18550#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18551#[doc = ""]
18552#[doc = "ID: 89"]
18553#[derive(Debug, Clone, PartialEq)]
18554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18556#[cfg_attr(feature = "ts", derive(TS))]
18557#[cfg_attr(feature = "ts", ts(export))]
18558pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18559    #[doc = "Timestamp (time since system boot)."]
18560    pub time_boot_ms: u32,
18561    #[doc = "X Position"]
18562    pub x: f32,
18563    #[doc = "Y Position"]
18564    pub y: f32,
18565    #[doc = "Z Position"]
18566    pub z: f32,
18567    #[doc = "Roll"]
18568    pub roll: f32,
18569    #[doc = "Pitch"]
18570    pub pitch: f32,
18571    #[doc = "Yaw"]
18572    pub yaw: f32,
18573}
18574impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18575    pub const ENCODED_LEN: usize = 28usize;
18576    pub const DEFAULT: Self = Self {
18577        time_boot_ms: 0_u32,
18578        x: 0.0_f32,
18579        y: 0.0_f32,
18580        z: 0.0_f32,
18581        roll: 0.0_f32,
18582        pitch: 0.0_f32,
18583        yaw: 0.0_f32,
18584    };
18585    #[cfg(feature = "arbitrary")]
18586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18587        use arbitrary::{Arbitrary, Unstructured};
18588        let mut buf = [0u8; 1024];
18589        rng.fill_bytes(&mut buf);
18590        let mut unstructured = Unstructured::new(&buf);
18591        Self::arbitrary(&mut unstructured).unwrap_or_default()
18592    }
18593}
18594impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18595    fn default() -> Self {
18596        Self::DEFAULT.clone()
18597    }
18598}
18599impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18600    type Message = MavMessage;
18601    const ID: u32 = 89u32;
18602    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18603    const EXTRA_CRC: u8 = 231u8;
18604    const ENCODED_LEN: usize = 28usize;
18605    fn deser(
18606        _version: MavlinkVersion,
18607        __input: &[u8],
18608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18609        let avail_len = __input.len();
18610        let mut payload_buf = [0; Self::ENCODED_LEN];
18611        let mut buf = if avail_len < Self::ENCODED_LEN {
18612            payload_buf[0..avail_len].copy_from_slice(__input);
18613            Bytes::new(&payload_buf)
18614        } else {
18615            Bytes::new(__input)
18616        };
18617        let mut __struct = Self::default();
18618        __struct.time_boot_ms = buf.get_u32_le();
18619        __struct.x = buf.get_f32_le();
18620        __struct.y = buf.get_f32_le();
18621        __struct.z = buf.get_f32_le();
18622        __struct.roll = buf.get_f32_le();
18623        __struct.pitch = buf.get_f32_le();
18624        __struct.yaw = buf.get_f32_le();
18625        Ok(__struct)
18626    }
18627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18628        let mut __tmp = BytesMut::new(bytes);
18629        #[allow(clippy::absurd_extreme_comparisons)]
18630        #[allow(unused_comparisons)]
18631        if __tmp.remaining() < Self::ENCODED_LEN {
18632            panic!(
18633                "buffer is too small (need {} bytes, but got {})",
18634                Self::ENCODED_LEN,
18635                __tmp.remaining(),
18636            )
18637        }
18638        __tmp.put_u32_le(self.time_boot_ms);
18639        __tmp.put_f32_le(self.x);
18640        __tmp.put_f32_le(self.y);
18641        __tmp.put_f32_le(self.z);
18642        __tmp.put_f32_le(self.roll);
18643        __tmp.put_f32_le(self.pitch);
18644        __tmp.put_f32_le(self.yaw);
18645        if matches!(version, MavlinkVersion::V2) {
18646            let len = __tmp.len();
18647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18648        } else {
18649            __tmp.len()
18650        }
18651    }
18652}
18653#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18654#[doc = ""]
18655#[doc = "ID: 268"]
18656#[derive(Debug, Clone, PartialEq)]
18657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18659#[cfg_attr(feature = "ts", derive(TS))]
18660#[cfg_attr(feature = "ts", ts(export))]
18661pub struct LOGGING_ACK_DATA {
18662    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18663    pub sequence: u16,
18664    #[doc = "system ID of the target"]
18665    pub target_system: u8,
18666    #[doc = "component ID of the target"]
18667    pub target_component: u8,
18668}
18669impl LOGGING_ACK_DATA {
18670    pub const ENCODED_LEN: usize = 4usize;
18671    pub const DEFAULT: Self = Self {
18672        sequence: 0_u16,
18673        target_system: 0_u8,
18674        target_component: 0_u8,
18675    };
18676    #[cfg(feature = "arbitrary")]
18677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18678        use arbitrary::{Arbitrary, Unstructured};
18679        let mut buf = [0u8; 1024];
18680        rng.fill_bytes(&mut buf);
18681        let mut unstructured = Unstructured::new(&buf);
18682        Self::arbitrary(&mut unstructured).unwrap_or_default()
18683    }
18684}
18685impl Default for LOGGING_ACK_DATA {
18686    fn default() -> Self {
18687        Self::DEFAULT.clone()
18688    }
18689}
18690impl MessageData for LOGGING_ACK_DATA {
18691    type Message = MavMessage;
18692    const ID: u32 = 268u32;
18693    const NAME: &'static str = "LOGGING_ACK";
18694    const EXTRA_CRC: u8 = 14u8;
18695    const ENCODED_LEN: usize = 4usize;
18696    fn deser(
18697        _version: MavlinkVersion,
18698        __input: &[u8],
18699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18700        let avail_len = __input.len();
18701        let mut payload_buf = [0; Self::ENCODED_LEN];
18702        let mut buf = if avail_len < Self::ENCODED_LEN {
18703            payload_buf[0..avail_len].copy_from_slice(__input);
18704            Bytes::new(&payload_buf)
18705        } else {
18706            Bytes::new(__input)
18707        };
18708        let mut __struct = Self::default();
18709        __struct.sequence = buf.get_u16_le();
18710        __struct.target_system = buf.get_u8();
18711        __struct.target_component = buf.get_u8();
18712        Ok(__struct)
18713    }
18714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18715        let mut __tmp = BytesMut::new(bytes);
18716        #[allow(clippy::absurd_extreme_comparisons)]
18717        #[allow(unused_comparisons)]
18718        if __tmp.remaining() < Self::ENCODED_LEN {
18719            panic!(
18720                "buffer is too small (need {} bytes, but got {})",
18721                Self::ENCODED_LEN,
18722                __tmp.remaining(),
18723            )
18724        }
18725        __tmp.put_u16_le(self.sequence);
18726        __tmp.put_u8(self.target_system);
18727        __tmp.put_u8(self.target_component);
18728        if matches!(version, MavlinkVersion::V2) {
18729            let len = __tmp.len();
18730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18731        } else {
18732            __tmp.len()
18733        }
18734    }
18735}
18736#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18737#[doc = ""]
18738#[doc = "ID: 266"]
18739#[derive(Debug, Clone, PartialEq)]
18740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18742#[cfg_attr(feature = "ts", derive(TS))]
18743#[cfg_attr(feature = "ts", ts(export))]
18744pub struct LOGGING_DATA_DATA {
18745    #[doc = "sequence number (can wrap)"]
18746    pub sequence: u16,
18747    #[doc = "system ID of the target"]
18748    pub target_system: u8,
18749    #[doc = "component ID of the target"]
18750    pub target_component: u8,
18751    #[doc = "data length"]
18752    pub length: u8,
18753    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18754    pub first_message_offset: u8,
18755    #[doc = "logged data"]
18756    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18757    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18758    pub data: [u8; 249],
18759}
18760impl LOGGING_DATA_DATA {
18761    pub const ENCODED_LEN: usize = 255usize;
18762    pub const DEFAULT: Self = Self {
18763        sequence: 0_u16,
18764        target_system: 0_u8,
18765        target_component: 0_u8,
18766        length: 0_u8,
18767        first_message_offset: 0_u8,
18768        data: [0_u8; 249usize],
18769    };
18770    #[cfg(feature = "arbitrary")]
18771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18772        use arbitrary::{Arbitrary, Unstructured};
18773        let mut buf = [0u8; 1024];
18774        rng.fill_bytes(&mut buf);
18775        let mut unstructured = Unstructured::new(&buf);
18776        Self::arbitrary(&mut unstructured).unwrap_or_default()
18777    }
18778}
18779impl Default for LOGGING_DATA_DATA {
18780    fn default() -> Self {
18781        Self::DEFAULT.clone()
18782    }
18783}
18784impl MessageData for LOGGING_DATA_DATA {
18785    type Message = MavMessage;
18786    const ID: u32 = 266u32;
18787    const NAME: &'static str = "LOGGING_DATA";
18788    const EXTRA_CRC: u8 = 193u8;
18789    const ENCODED_LEN: usize = 255usize;
18790    fn deser(
18791        _version: MavlinkVersion,
18792        __input: &[u8],
18793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18794        let avail_len = __input.len();
18795        let mut payload_buf = [0; Self::ENCODED_LEN];
18796        let mut buf = if avail_len < Self::ENCODED_LEN {
18797            payload_buf[0..avail_len].copy_from_slice(__input);
18798            Bytes::new(&payload_buf)
18799        } else {
18800            Bytes::new(__input)
18801        };
18802        let mut __struct = Self::default();
18803        __struct.sequence = buf.get_u16_le();
18804        __struct.target_system = buf.get_u8();
18805        __struct.target_component = buf.get_u8();
18806        __struct.length = buf.get_u8();
18807        __struct.first_message_offset = buf.get_u8();
18808        for v in &mut __struct.data {
18809            let val = buf.get_u8();
18810            *v = val;
18811        }
18812        Ok(__struct)
18813    }
18814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18815        let mut __tmp = BytesMut::new(bytes);
18816        #[allow(clippy::absurd_extreme_comparisons)]
18817        #[allow(unused_comparisons)]
18818        if __tmp.remaining() < Self::ENCODED_LEN {
18819            panic!(
18820                "buffer is too small (need {} bytes, but got {})",
18821                Self::ENCODED_LEN,
18822                __tmp.remaining(),
18823            )
18824        }
18825        __tmp.put_u16_le(self.sequence);
18826        __tmp.put_u8(self.target_system);
18827        __tmp.put_u8(self.target_component);
18828        __tmp.put_u8(self.length);
18829        __tmp.put_u8(self.first_message_offset);
18830        for val in &self.data {
18831            __tmp.put_u8(*val);
18832        }
18833        if matches!(version, MavlinkVersion::V2) {
18834            let len = __tmp.len();
18835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18836        } else {
18837            __tmp.len()
18838        }
18839    }
18840}
18841#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18842#[doc = ""]
18843#[doc = "ID: 267"]
18844#[derive(Debug, Clone, PartialEq)]
18845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18847#[cfg_attr(feature = "ts", derive(TS))]
18848#[cfg_attr(feature = "ts", ts(export))]
18849pub struct LOGGING_DATA_ACKED_DATA {
18850    #[doc = "sequence number (can wrap)"]
18851    pub sequence: u16,
18852    #[doc = "system ID of the target"]
18853    pub target_system: u8,
18854    #[doc = "component ID of the target"]
18855    pub target_component: u8,
18856    #[doc = "data length"]
18857    pub length: u8,
18858    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18859    pub first_message_offset: u8,
18860    #[doc = "logged data"]
18861    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18862    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18863    pub data: [u8; 249],
18864}
18865impl LOGGING_DATA_ACKED_DATA {
18866    pub const ENCODED_LEN: usize = 255usize;
18867    pub const DEFAULT: Self = Self {
18868        sequence: 0_u16,
18869        target_system: 0_u8,
18870        target_component: 0_u8,
18871        length: 0_u8,
18872        first_message_offset: 0_u8,
18873        data: [0_u8; 249usize],
18874    };
18875    #[cfg(feature = "arbitrary")]
18876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18877        use arbitrary::{Arbitrary, Unstructured};
18878        let mut buf = [0u8; 1024];
18879        rng.fill_bytes(&mut buf);
18880        let mut unstructured = Unstructured::new(&buf);
18881        Self::arbitrary(&mut unstructured).unwrap_or_default()
18882    }
18883}
18884impl Default for LOGGING_DATA_ACKED_DATA {
18885    fn default() -> Self {
18886        Self::DEFAULT.clone()
18887    }
18888}
18889impl MessageData for LOGGING_DATA_ACKED_DATA {
18890    type Message = MavMessage;
18891    const ID: u32 = 267u32;
18892    const NAME: &'static str = "LOGGING_DATA_ACKED";
18893    const EXTRA_CRC: u8 = 35u8;
18894    const ENCODED_LEN: usize = 255usize;
18895    fn deser(
18896        _version: MavlinkVersion,
18897        __input: &[u8],
18898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18899        let avail_len = __input.len();
18900        let mut payload_buf = [0; Self::ENCODED_LEN];
18901        let mut buf = if avail_len < Self::ENCODED_LEN {
18902            payload_buf[0..avail_len].copy_from_slice(__input);
18903            Bytes::new(&payload_buf)
18904        } else {
18905            Bytes::new(__input)
18906        };
18907        let mut __struct = Self::default();
18908        __struct.sequence = buf.get_u16_le();
18909        __struct.target_system = buf.get_u8();
18910        __struct.target_component = buf.get_u8();
18911        __struct.length = buf.get_u8();
18912        __struct.first_message_offset = buf.get_u8();
18913        for v in &mut __struct.data {
18914            let val = buf.get_u8();
18915            *v = val;
18916        }
18917        Ok(__struct)
18918    }
18919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18920        let mut __tmp = BytesMut::new(bytes);
18921        #[allow(clippy::absurd_extreme_comparisons)]
18922        #[allow(unused_comparisons)]
18923        if __tmp.remaining() < Self::ENCODED_LEN {
18924            panic!(
18925                "buffer is too small (need {} bytes, but got {})",
18926                Self::ENCODED_LEN,
18927                __tmp.remaining(),
18928            )
18929        }
18930        __tmp.put_u16_le(self.sequence);
18931        __tmp.put_u8(self.target_system);
18932        __tmp.put_u8(self.target_component);
18933        __tmp.put_u8(self.length);
18934        __tmp.put_u8(self.first_message_offset);
18935        for val in &self.data {
18936            __tmp.put_u8(*val);
18937        }
18938        if matches!(version, MavlinkVersion::V2) {
18939            let len = __tmp.len();
18940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18941        } else {
18942            __tmp.len()
18943        }
18944    }
18945}
18946#[doc = "Reply to LOG_REQUEST_DATA."]
18947#[doc = ""]
18948#[doc = "ID: 120"]
18949#[derive(Debug, Clone, PartialEq)]
18950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18952#[cfg_attr(feature = "ts", derive(TS))]
18953#[cfg_attr(feature = "ts", ts(export))]
18954pub struct LOG_DATA_DATA {
18955    #[doc = "Offset into the log"]
18956    pub ofs: u32,
18957    #[doc = "Log id (from LOG_ENTRY reply)"]
18958    pub id: u16,
18959    #[doc = "Number of bytes (zero for end of log)"]
18960    pub count: u8,
18961    #[doc = "log data"]
18962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18963    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18964    pub data: [u8; 90],
18965}
18966impl LOG_DATA_DATA {
18967    pub const ENCODED_LEN: usize = 97usize;
18968    pub const DEFAULT: Self = Self {
18969        ofs: 0_u32,
18970        id: 0_u16,
18971        count: 0_u8,
18972        data: [0_u8; 90usize],
18973    };
18974    #[cfg(feature = "arbitrary")]
18975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18976        use arbitrary::{Arbitrary, Unstructured};
18977        let mut buf = [0u8; 1024];
18978        rng.fill_bytes(&mut buf);
18979        let mut unstructured = Unstructured::new(&buf);
18980        Self::arbitrary(&mut unstructured).unwrap_or_default()
18981    }
18982}
18983impl Default for LOG_DATA_DATA {
18984    fn default() -> Self {
18985        Self::DEFAULT.clone()
18986    }
18987}
18988impl MessageData for LOG_DATA_DATA {
18989    type Message = MavMessage;
18990    const ID: u32 = 120u32;
18991    const NAME: &'static str = "LOG_DATA";
18992    const EXTRA_CRC: u8 = 134u8;
18993    const ENCODED_LEN: usize = 97usize;
18994    fn deser(
18995        _version: MavlinkVersion,
18996        __input: &[u8],
18997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18998        let avail_len = __input.len();
18999        let mut payload_buf = [0; Self::ENCODED_LEN];
19000        let mut buf = if avail_len < Self::ENCODED_LEN {
19001            payload_buf[0..avail_len].copy_from_slice(__input);
19002            Bytes::new(&payload_buf)
19003        } else {
19004            Bytes::new(__input)
19005        };
19006        let mut __struct = Self::default();
19007        __struct.ofs = buf.get_u32_le();
19008        __struct.id = buf.get_u16_le();
19009        __struct.count = buf.get_u8();
19010        for v in &mut __struct.data {
19011            let val = buf.get_u8();
19012            *v = val;
19013        }
19014        Ok(__struct)
19015    }
19016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19017        let mut __tmp = BytesMut::new(bytes);
19018        #[allow(clippy::absurd_extreme_comparisons)]
19019        #[allow(unused_comparisons)]
19020        if __tmp.remaining() < Self::ENCODED_LEN {
19021            panic!(
19022                "buffer is too small (need {} bytes, but got {})",
19023                Self::ENCODED_LEN,
19024                __tmp.remaining(),
19025            )
19026        }
19027        __tmp.put_u32_le(self.ofs);
19028        __tmp.put_u16_le(self.id);
19029        __tmp.put_u8(self.count);
19030        for val in &self.data {
19031            __tmp.put_u8(*val);
19032        }
19033        if matches!(version, MavlinkVersion::V2) {
19034            let len = __tmp.len();
19035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19036        } else {
19037            __tmp.len()
19038        }
19039    }
19040}
19041#[doc = "Reply to LOG_REQUEST_LIST."]
19042#[doc = ""]
19043#[doc = "ID: 118"]
19044#[derive(Debug, Clone, PartialEq)]
19045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19047#[cfg_attr(feature = "ts", derive(TS))]
19048#[cfg_attr(feature = "ts", ts(export))]
19049pub struct LOG_ENTRY_DATA {
19050    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19051    pub time_utc: u32,
19052    #[doc = "Size of the log (may be approximate)"]
19053    pub size: u32,
19054    #[doc = "Log id"]
19055    pub id: u16,
19056    #[doc = "Total number of logs"]
19057    pub num_logs: u16,
19058    #[doc = "High log number"]
19059    pub last_log_num: u16,
19060}
19061impl LOG_ENTRY_DATA {
19062    pub const ENCODED_LEN: usize = 14usize;
19063    pub const DEFAULT: Self = Self {
19064        time_utc: 0_u32,
19065        size: 0_u32,
19066        id: 0_u16,
19067        num_logs: 0_u16,
19068        last_log_num: 0_u16,
19069    };
19070    #[cfg(feature = "arbitrary")]
19071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19072        use arbitrary::{Arbitrary, Unstructured};
19073        let mut buf = [0u8; 1024];
19074        rng.fill_bytes(&mut buf);
19075        let mut unstructured = Unstructured::new(&buf);
19076        Self::arbitrary(&mut unstructured).unwrap_or_default()
19077    }
19078}
19079impl Default for LOG_ENTRY_DATA {
19080    fn default() -> Self {
19081        Self::DEFAULT.clone()
19082    }
19083}
19084impl MessageData for LOG_ENTRY_DATA {
19085    type Message = MavMessage;
19086    const ID: u32 = 118u32;
19087    const NAME: &'static str = "LOG_ENTRY";
19088    const EXTRA_CRC: u8 = 56u8;
19089    const ENCODED_LEN: usize = 14usize;
19090    fn deser(
19091        _version: MavlinkVersion,
19092        __input: &[u8],
19093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19094        let avail_len = __input.len();
19095        let mut payload_buf = [0; Self::ENCODED_LEN];
19096        let mut buf = if avail_len < Self::ENCODED_LEN {
19097            payload_buf[0..avail_len].copy_from_slice(__input);
19098            Bytes::new(&payload_buf)
19099        } else {
19100            Bytes::new(__input)
19101        };
19102        let mut __struct = Self::default();
19103        __struct.time_utc = buf.get_u32_le();
19104        __struct.size = buf.get_u32_le();
19105        __struct.id = buf.get_u16_le();
19106        __struct.num_logs = buf.get_u16_le();
19107        __struct.last_log_num = buf.get_u16_le();
19108        Ok(__struct)
19109    }
19110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19111        let mut __tmp = BytesMut::new(bytes);
19112        #[allow(clippy::absurd_extreme_comparisons)]
19113        #[allow(unused_comparisons)]
19114        if __tmp.remaining() < Self::ENCODED_LEN {
19115            panic!(
19116                "buffer is too small (need {} bytes, but got {})",
19117                Self::ENCODED_LEN,
19118                __tmp.remaining(),
19119            )
19120        }
19121        __tmp.put_u32_le(self.time_utc);
19122        __tmp.put_u32_le(self.size);
19123        __tmp.put_u16_le(self.id);
19124        __tmp.put_u16_le(self.num_logs);
19125        __tmp.put_u16_le(self.last_log_num);
19126        if matches!(version, MavlinkVersion::V2) {
19127            let len = __tmp.len();
19128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19129        } else {
19130            __tmp.len()
19131        }
19132    }
19133}
19134#[doc = "Erase all logs."]
19135#[doc = ""]
19136#[doc = "ID: 121"]
19137#[derive(Debug, Clone, PartialEq)]
19138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19140#[cfg_attr(feature = "ts", derive(TS))]
19141#[cfg_attr(feature = "ts", ts(export))]
19142pub struct LOG_ERASE_DATA {
19143    #[doc = "System ID"]
19144    pub target_system: u8,
19145    #[doc = "Component ID"]
19146    pub target_component: u8,
19147}
19148impl LOG_ERASE_DATA {
19149    pub const ENCODED_LEN: usize = 2usize;
19150    pub const DEFAULT: Self = Self {
19151        target_system: 0_u8,
19152        target_component: 0_u8,
19153    };
19154    #[cfg(feature = "arbitrary")]
19155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19156        use arbitrary::{Arbitrary, Unstructured};
19157        let mut buf = [0u8; 1024];
19158        rng.fill_bytes(&mut buf);
19159        let mut unstructured = Unstructured::new(&buf);
19160        Self::arbitrary(&mut unstructured).unwrap_or_default()
19161    }
19162}
19163impl Default for LOG_ERASE_DATA {
19164    fn default() -> Self {
19165        Self::DEFAULT.clone()
19166    }
19167}
19168impl MessageData for LOG_ERASE_DATA {
19169    type Message = MavMessage;
19170    const ID: u32 = 121u32;
19171    const NAME: &'static str = "LOG_ERASE";
19172    const EXTRA_CRC: u8 = 237u8;
19173    const ENCODED_LEN: usize = 2usize;
19174    fn deser(
19175        _version: MavlinkVersion,
19176        __input: &[u8],
19177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19178        let avail_len = __input.len();
19179        let mut payload_buf = [0; Self::ENCODED_LEN];
19180        let mut buf = if avail_len < Self::ENCODED_LEN {
19181            payload_buf[0..avail_len].copy_from_slice(__input);
19182            Bytes::new(&payload_buf)
19183        } else {
19184            Bytes::new(__input)
19185        };
19186        let mut __struct = Self::default();
19187        __struct.target_system = buf.get_u8();
19188        __struct.target_component = buf.get_u8();
19189        Ok(__struct)
19190    }
19191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19192        let mut __tmp = BytesMut::new(bytes);
19193        #[allow(clippy::absurd_extreme_comparisons)]
19194        #[allow(unused_comparisons)]
19195        if __tmp.remaining() < Self::ENCODED_LEN {
19196            panic!(
19197                "buffer is too small (need {} bytes, but got {})",
19198                Self::ENCODED_LEN,
19199                __tmp.remaining(),
19200            )
19201        }
19202        __tmp.put_u8(self.target_system);
19203        __tmp.put_u8(self.target_component);
19204        if matches!(version, MavlinkVersion::V2) {
19205            let len = __tmp.len();
19206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19207        } else {
19208            __tmp.len()
19209        }
19210    }
19211}
19212#[doc = "Request a chunk of a log."]
19213#[doc = ""]
19214#[doc = "ID: 119"]
19215#[derive(Debug, Clone, PartialEq)]
19216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19218#[cfg_attr(feature = "ts", derive(TS))]
19219#[cfg_attr(feature = "ts", ts(export))]
19220pub struct LOG_REQUEST_DATA_DATA {
19221    #[doc = "Offset into the log"]
19222    pub ofs: u32,
19223    #[doc = "Number of bytes"]
19224    pub count: u32,
19225    #[doc = "Log id (from LOG_ENTRY reply)"]
19226    pub id: u16,
19227    #[doc = "System ID"]
19228    pub target_system: u8,
19229    #[doc = "Component ID"]
19230    pub target_component: u8,
19231}
19232impl LOG_REQUEST_DATA_DATA {
19233    pub const ENCODED_LEN: usize = 12usize;
19234    pub const DEFAULT: Self = Self {
19235        ofs: 0_u32,
19236        count: 0_u32,
19237        id: 0_u16,
19238        target_system: 0_u8,
19239        target_component: 0_u8,
19240    };
19241    #[cfg(feature = "arbitrary")]
19242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19243        use arbitrary::{Arbitrary, Unstructured};
19244        let mut buf = [0u8; 1024];
19245        rng.fill_bytes(&mut buf);
19246        let mut unstructured = Unstructured::new(&buf);
19247        Self::arbitrary(&mut unstructured).unwrap_or_default()
19248    }
19249}
19250impl Default for LOG_REQUEST_DATA_DATA {
19251    fn default() -> Self {
19252        Self::DEFAULT.clone()
19253    }
19254}
19255impl MessageData for LOG_REQUEST_DATA_DATA {
19256    type Message = MavMessage;
19257    const ID: u32 = 119u32;
19258    const NAME: &'static str = "LOG_REQUEST_DATA";
19259    const EXTRA_CRC: u8 = 116u8;
19260    const ENCODED_LEN: usize = 12usize;
19261    fn deser(
19262        _version: MavlinkVersion,
19263        __input: &[u8],
19264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19265        let avail_len = __input.len();
19266        let mut payload_buf = [0; Self::ENCODED_LEN];
19267        let mut buf = if avail_len < Self::ENCODED_LEN {
19268            payload_buf[0..avail_len].copy_from_slice(__input);
19269            Bytes::new(&payload_buf)
19270        } else {
19271            Bytes::new(__input)
19272        };
19273        let mut __struct = Self::default();
19274        __struct.ofs = buf.get_u32_le();
19275        __struct.count = buf.get_u32_le();
19276        __struct.id = buf.get_u16_le();
19277        __struct.target_system = buf.get_u8();
19278        __struct.target_component = buf.get_u8();
19279        Ok(__struct)
19280    }
19281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19282        let mut __tmp = BytesMut::new(bytes);
19283        #[allow(clippy::absurd_extreme_comparisons)]
19284        #[allow(unused_comparisons)]
19285        if __tmp.remaining() < Self::ENCODED_LEN {
19286            panic!(
19287                "buffer is too small (need {} bytes, but got {})",
19288                Self::ENCODED_LEN,
19289                __tmp.remaining(),
19290            )
19291        }
19292        __tmp.put_u32_le(self.ofs);
19293        __tmp.put_u32_le(self.count);
19294        __tmp.put_u16_le(self.id);
19295        __tmp.put_u8(self.target_system);
19296        __tmp.put_u8(self.target_component);
19297        if matches!(version, MavlinkVersion::V2) {
19298            let len = __tmp.len();
19299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19300        } else {
19301            __tmp.len()
19302        }
19303    }
19304}
19305#[doc = "Stop log transfer and resume normal logging."]
19306#[doc = ""]
19307#[doc = "ID: 122"]
19308#[derive(Debug, Clone, PartialEq)]
19309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19311#[cfg_attr(feature = "ts", derive(TS))]
19312#[cfg_attr(feature = "ts", ts(export))]
19313pub struct LOG_REQUEST_END_DATA {
19314    #[doc = "System ID"]
19315    pub target_system: u8,
19316    #[doc = "Component ID"]
19317    pub target_component: u8,
19318}
19319impl LOG_REQUEST_END_DATA {
19320    pub const ENCODED_LEN: usize = 2usize;
19321    pub const DEFAULT: Self = Self {
19322        target_system: 0_u8,
19323        target_component: 0_u8,
19324    };
19325    #[cfg(feature = "arbitrary")]
19326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19327        use arbitrary::{Arbitrary, Unstructured};
19328        let mut buf = [0u8; 1024];
19329        rng.fill_bytes(&mut buf);
19330        let mut unstructured = Unstructured::new(&buf);
19331        Self::arbitrary(&mut unstructured).unwrap_or_default()
19332    }
19333}
19334impl Default for LOG_REQUEST_END_DATA {
19335    fn default() -> Self {
19336        Self::DEFAULT.clone()
19337    }
19338}
19339impl MessageData for LOG_REQUEST_END_DATA {
19340    type Message = MavMessage;
19341    const ID: u32 = 122u32;
19342    const NAME: &'static str = "LOG_REQUEST_END";
19343    const EXTRA_CRC: u8 = 203u8;
19344    const ENCODED_LEN: usize = 2usize;
19345    fn deser(
19346        _version: MavlinkVersion,
19347        __input: &[u8],
19348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19349        let avail_len = __input.len();
19350        let mut payload_buf = [0; Self::ENCODED_LEN];
19351        let mut buf = if avail_len < Self::ENCODED_LEN {
19352            payload_buf[0..avail_len].copy_from_slice(__input);
19353            Bytes::new(&payload_buf)
19354        } else {
19355            Bytes::new(__input)
19356        };
19357        let mut __struct = Self::default();
19358        __struct.target_system = buf.get_u8();
19359        __struct.target_component = buf.get_u8();
19360        Ok(__struct)
19361    }
19362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19363        let mut __tmp = BytesMut::new(bytes);
19364        #[allow(clippy::absurd_extreme_comparisons)]
19365        #[allow(unused_comparisons)]
19366        if __tmp.remaining() < Self::ENCODED_LEN {
19367            panic!(
19368                "buffer is too small (need {} bytes, but got {})",
19369                Self::ENCODED_LEN,
19370                __tmp.remaining(),
19371            )
19372        }
19373        __tmp.put_u8(self.target_system);
19374        __tmp.put_u8(self.target_component);
19375        if matches!(version, MavlinkVersion::V2) {
19376            let len = __tmp.len();
19377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19378        } else {
19379            __tmp.len()
19380        }
19381    }
19382}
19383#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19384#[doc = ""]
19385#[doc = "ID: 117"]
19386#[derive(Debug, Clone, PartialEq)]
19387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19389#[cfg_attr(feature = "ts", derive(TS))]
19390#[cfg_attr(feature = "ts", ts(export))]
19391pub struct LOG_REQUEST_LIST_DATA {
19392    #[doc = "First log id (0 for first available)"]
19393    pub start: u16,
19394    #[doc = "Last log id (0xffff for last available)"]
19395    pub end: u16,
19396    #[doc = "System ID"]
19397    pub target_system: u8,
19398    #[doc = "Component ID"]
19399    pub target_component: u8,
19400}
19401impl LOG_REQUEST_LIST_DATA {
19402    pub const ENCODED_LEN: usize = 6usize;
19403    pub const DEFAULT: Self = Self {
19404        start: 0_u16,
19405        end: 0_u16,
19406        target_system: 0_u8,
19407        target_component: 0_u8,
19408    };
19409    #[cfg(feature = "arbitrary")]
19410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19411        use arbitrary::{Arbitrary, Unstructured};
19412        let mut buf = [0u8; 1024];
19413        rng.fill_bytes(&mut buf);
19414        let mut unstructured = Unstructured::new(&buf);
19415        Self::arbitrary(&mut unstructured).unwrap_or_default()
19416    }
19417}
19418impl Default for LOG_REQUEST_LIST_DATA {
19419    fn default() -> Self {
19420        Self::DEFAULT.clone()
19421    }
19422}
19423impl MessageData for LOG_REQUEST_LIST_DATA {
19424    type Message = MavMessage;
19425    const ID: u32 = 117u32;
19426    const NAME: &'static str = "LOG_REQUEST_LIST";
19427    const EXTRA_CRC: u8 = 128u8;
19428    const ENCODED_LEN: usize = 6usize;
19429    fn deser(
19430        _version: MavlinkVersion,
19431        __input: &[u8],
19432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19433        let avail_len = __input.len();
19434        let mut payload_buf = [0; Self::ENCODED_LEN];
19435        let mut buf = if avail_len < Self::ENCODED_LEN {
19436            payload_buf[0..avail_len].copy_from_slice(__input);
19437            Bytes::new(&payload_buf)
19438        } else {
19439            Bytes::new(__input)
19440        };
19441        let mut __struct = Self::default();
19442        __struct.start = buf.get_u16_le();
19443        __struct.end = buf.get_u16_le();
19444        __struct.target_system = buf.get_u8();
19445        __struct.target_component = buf.get_u8();
19446        Ok(__struct)
19447    }
19448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19449        let mut __tmp = BytesMut::new(bytes);
19450        #[allow(clippy::absurd_extreme_comparisons)]
19451        #[allow(unused_comparisons)]
19452        if __tmp.remaining() < Self::ENCODED_LEN {
19453            panic!(
19454                "buffer is too small (need {} bytes, but got {})",
19455                Self::ENCODED_LEN,
19456                __tmp.remaining(),
19457            )
19458        }
19459        __tmp.put_u16_le(self.start);
19460        __tmp.put_u16_le(self.end);
19461        __tmp.put_u8(self.target_system);
19462        __tmp.put_u8(self.target_component);
19463        if matches!(version, MavlinkVersion::V2) {
19464            let len = __tmp.len();
19465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19466        } else {
19467            __tmp.len()
19468        }
19469    }
19470}
19471#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19472#[doc = ""]
19473#[doc = "ID: 192"]
19474#[derive(Debug, Clone, PartialEq)]
19475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19477#[cfg_attr(feature = "ts", derive(TS))]
19478#[cfg_attr(feature = "ts", ts(export))]
19479pub struct MAG_CAL_REPORT_DATA {
19480    #[doc = "RMS milligauss residuals."]
19481    pub fitness: f32,
19482    #[doc = "X offset."]
19483    pub ofs_x: f32,
19484    #[doc = "Y offset."]
19485    pub ofs_y: f32,
19486    #[doc = "Z offset."]
19487    pub ofs_z: f32,
19488    #[doc = "X diagonal (matrix 11)."]
19489    pub diag_x: f32,
19490    #[doc = "Y diagonal (matrix 22)."]
19491    pub diag_y: f32,
19492    #[doc = "Z diagonal (matrix 33)."]
19493    pub diag_z: f32,
19494    #[doc = "X off-diagonal (matrix 12 and 21)."]
19495    pub offdiag_x: f32,
19496    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19497    pub offdiag_y: f32,
19498    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19499    pub offdiag_z: f32,
19500    #[doc = "Compass being calibrated."]
19501    pub compass_id: u8,
19502    #[doc = "Bitmask of compasses being calibrated."]
19503    pub cal_mask: u8,
19504    #[doc = "Calibration Status."]
19505    pub cal_status: MagCalStatus,
19506    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19507    pub autosaved: u8,
19508    #[doc = "Confidence in orientation (higher is better)."]
19509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19510    pub orientation_confidence: f32,
19511    #[doc = "orientation before calibration."]
19512    #[cfg_attr(feature = "serde", serde(default))]
19513    pub old_orientation: MavSensorOrientation,
19514    #[doc = "orientation after calibration."]
19515    #[cfg_attr(feature = "serde", serde(default))]
19516    pub new_orientation: MavSensorOrientation,
19517    #[doc = "field radius correction factor"]
19518    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19519    pub scale_factor: f32,
19520}
19521impl MAG_CAL_REPORT_DATA {
19522    pub const ENCODED_LEN: usize = 54usize;
19523    pub const DEFAULT: Self = Self {
19524        fitness: 0.0_f32,
19525        ofs_x: 0.0_f32,
19526        ofs_y: 0.0_f32,
19527        ofs_z: 0.0_f32,
19528        diag_x: 0.0_f32,
19529        diag_y: 0.0_f32,
19530        diag_z: 0.0_f32,
19531        offdiag_x: 0.0_f32,
19532        offdiag_y: 0.0_f32,
19533        offdiag_z: 0.0_f32,
19534        compass_id: 0_u8,
19535        cal_mask: 0_u8,
19536        cal_status: MagCalStatus::DEFAULT,
19537        autosaved: 0_u8,
19538        orientation_confidence: 0.0_f32,
19539        old_orientation: MavSensorOrientation::DEFAULT,
19540        new_orientation: MavSensorOrientation::DEFAULT,
19541        scale_factor: 0.0_f32,
19542    };
19543    #[cfg(feature = "arbitrary")]
19544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19545        use arbitrary::{Arbitrary, Unstructured};
19546        let mut buf = [0u8; 1024];
19547        rng.fill_bytes(&mut buf);
19548        let mut unstructured = Unstructured::new(&buf);
19549        Self::arbitrary(&mut unstructured).unwrap_or_default()
19550    }
19551}
19552impl Default for MAG_CAL_REPORT_DATA {
19553    fn default() -> Self {
19554        Self::DEFAULT.clone()
19555    }
19556}
19557impl MessageData for MAG_CAL_REPORT_DATA {
19558    type Message = MavMessage;
19559    const ID: u32 = 192u32;
19560    const NAME: &'static str = "MAG_CAL_REPORT";
19561    const EXTRA_CRC: u8 = 36u8;
19562    const ENCODED_LEN: usize = 54usize;
19563    fn deser(
19564        _version: MavlinkVersion,
19565        __input: &[u8],
19566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19567        let avail_len = __input.len();
19568        let mut payload_buf = [0; Self::ENCODED_LEN];
19569        let mut buf = if avail_len < Self::ENCODED_LEN {
19570            payload_buf[0..avail_len].copy_from_slice(__input);
19571            Bytes::new(&payload_buf)
19572        } else {
19573            Bytes::new(__input)
19574        };
19575        let mut __struct = Self::default();
19576        __struct.fitness = buf.get_f32_le();
19577        __struct.ofs_x = buf.get_f32_le();
19578        __struct.ofs_y = buf.get_f32_le();
19579        __struct.ofs_z = buf.get_f32_le();
19580        __struct.diag_x = buf.get_f32_le();
19581        __struct.diag_y = buf.get_f32_le();
19582        __struct.diag_z = buf.get_f32_le();
19583        __struct.offdiag_x = buf.get_f32_le();
19584        __struct.offdiag_y = buf.get_f32_le();
19585        __struct.offdiag_z = buf.get_f32_le();
19586        __struct.compass_id = buf.get_u8();
19587        __struct.cal_mask = buf.get_u8();
19588        let tmp = buf.get_u8();
19589        __struct.cal_status =
19590            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19591                enum_type: "MagCalStatus",
19592                value: tmp as u32,
19593            })?;
19594        __struct.autosaved = buf.get_u8();
19595        __struct.orientation_confidence = buf.get_f32_le();
19596        let tmp = buf.get_u8();
19597        __struct.old_orientation =
19598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19599                enum_type: "MavSensorOrientation",
19600                value: tmp as u32,
19601            })?;
19602        let tmp = buf.get_u8();
19603        __struct.new_orientation =
19604            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19605                enum_type: "MavSensorOrientation",
19606                value: tmp as u32,
19607            })?;
19608        __struct.scale_factor = buf.get_f32_le();
19609        Ok(__struct)
19610    }
19611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19612        let mut __tmp = BytesMut::new(bytes);
19613        #[allow(clippy::absurd_extreme_comparisons)]
19614        #[allow(unused_comparisons)]
19615        if __tmp.remaining() < Self::ENCODED_LEN {
19616            panic!(
19617                "buffer is too small (need {} bytes, but got {})",
19618                Self::ENCODED_LEN,
19619                __tmp.remaining(),
19620            )
19621        }
19622        __tmp.put_f32_le(self.fitness);
19623        __tmp.put_f32_le(self.ofs_x);
19624        __tmp.put_f32_le(self.ofs_y);
19625        __tmp.put_f32_le(self.ofs_z);
19626        __tmp.put_f32_le(self.diag_x);
19627        __tmp.put_f32_le(self.diag_y);
19628        __tmp.put_f32_le(self.diag_z);
19629        __tmp.put_f32_le(self.offdiag_x);
19630        __tmp.put_f32_le(self.offdiag_y);
19631        __tmp.put_f32_le(self.offdiag_z);
19632        __tmp.put_u8(self.compass_id);
19633        __tmp.put_u8(self.cal_mask);
19634        __tmp.put_u8(self.cal_status as u8);
19635        __tmp.put_u8(self.autosaved);
19636        if matches!(version, MavlinkVersion::V2) {
19637            __tmp.put_f32_le(self.orientation_confidence);
19638            __tmp.put_u8(self.old_orientation as u8);
19639            __tmp.put_u8(self.new_orientation as u8);
19640            __tmp.put_f32_le(self.scale_factor);
19641            let len = __tmp.len();
19642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19643        } else {
19644            __tmp.len()
19645        }
19646    }
19647}
19648#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19649#[doc = ""]
19650#[doc = "ID: 69"]
19651#[derive(Debug, Clone, PartialEq)]
19652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19654#[cfg_attr(feature = "ts", derive(TS))]
19655#[cfg_attr(feature = "ts", ts(export))]
19656pub struct MANUAL_CONTROL_DATA {
19657    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19658    pub x: i16,
19659    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19660    pub y: i16,
19661    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19662    pub z: i16,
19663    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19664    pub r: i16,
19665    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19666    pub buttons: u16,
19667    #[doc = "The system to be controlled."]
19668    pub target: u8,
19669    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19670    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19671    pub buttons2: u16,
19672    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19674    pub enabled_extensions: u8,
19675    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19677    pub s: i16,
19678    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19680    pub t: i16,
19681    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19683    pub aux1: i16,
19684    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19686    pub aux2: i16,
19687    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19689    pub aux3: i16,
19690    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19692    pub aux4: i16,
19693    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19695    pub aux5: i16,
19696    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19698    pub aux6: i16,
19699}
19700impl MANUAL_CONTROL_DATA {
19701    pub const ENCODED_LEN: usize = 30usize;
19702    pub const DEFAULT: Self = Self {
19703        x: 0_i16,
19704        y: 0_i16,
19705        z: 0_i16,
19706        r: 0_i16,
19707        buttons: 0_u16,
19708        target: 0_u8,
19709        buttons2: 0_u16,
19710        enabled_extensions: 0_u8,
19711        s: 0_i16,
19712        t: 0_i16,
19713        aux1: 0_i16,
19714        aux2: 0_i16,
19715        aux3: 0_i16,
19716        aux4: 0_i16,
19717        aux5: 0_i16,
19718        aux6: 0_i16,
19719    };
19720    #[cfg(feature = "arbitrary")]
19721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19722        use arbitrary::{Arbitrary, Unstructured};
19723        let mut buf = [0u8; 1024];
19724        rng.fill_bytes(&mut buf);
19725        let mut unstructured = Unstructured::new(&buf);
19726        Self::arbitrary(&mut unstructured).unwrap_or_default()
19727    }
19728}
19729impl Default for MANUAL_CONTROL_DATA {
19730    fn default() -> Self {
19731        Self::DEFAULT.clone()
19732    }
19733}
19734impl MessageData for MANUAL_CONTROL_DATA {
19735    type Message = MavMessage;
19736    const ID: u32 = 69u32;
19737    const NAME: &'static str = "MANUAL_CONTROL";
19738    const EXTRA_CRC: u8 = 243u8;
19739    const ENCODED_LEN: usize = 30usize;
19740    fn deser(
19741        _version: MavlinkVersion,
19742        __input: &[u8],
19743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19744        let avail_len = __input.len();
19745        let mut payload_buf = [0; Self::ENCODED_LEN];
19746        let mut buf = if avail_len < Self::ENCODED_LEN {
19747            payload_buf[0..avail_len].copy_from_slice(__input);
19748            Bytes::new(&payload_buf)
19749        } else {
19750            Bytes::new(__input)
19751        };
19752        let mut __struct = Self::default();
19753        __struct.x = buf.get_i16_le();
19754        __struct.y = buf.get_i16_le();
19755        __struct.z = buf.get_i16_le();
19756        __struct.r = buf.get_i16_le();
19757        __struct.buttons = buf.get_u16_le();
19758        __struct.target = buf.get_u8();
19759        __struct.buttons2 = buf.get_u16_le();
19760        __struct.enabled_extensions = buf.get_u8();
19761        __struct.s = buf.get_i16_le();
19762        __struct.t = buf.get_i16_le();
19763        __struct.aux1 = buf.get_i16_le();
19764        __struct.aux2 = buf.get_i16_le();
19765        __struct.aux3 = buf.get_i16_le();
19766        __struct.aux4 = buf.get_i16_le();
19767        __struct.aux5 = buf.get_i16_le();
19768        __struct.aux6 = buf.get_i16_le();
19769        Ok(__struct)
19770    }
19771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19772        let mut __tmp = BytesMut::new(bytes);
19773        #[allow(clippy::absurd_extreme_comparisons)]
19774        #[allow(unused_comparisons)]
19775        if __tmp.remaining() < Self::ENCODED_LEN {
19776            panic!(
19777                "buffer is too small (need {} bytes, but got {})",
19778                Self::ENCODED_LEN,
19779                __tmp.remaining(),
19780            )
19781        }
19782        __tmp.put_i16_le(self.x);
19783        __tmp.put_i16_le(self.y);
19784        __tmp.put_i16_le(self.z);
19785        __tmp.put_i16_le(self.r);
19786        __tmp.put_u16_le(self.buttons);
19787        __tmp.put_u8(self.target);
19788        if matches!(version, MavlinkVersion::V2) {
19789            __tmp.put_u16_le(self.buttons2);
19790            __tmp.put_u8(self.enabled_extensions);
19791            __tmp.put_i16_le(self.s);
19792            __tmp.put_i16_le(self.t);
19793            __tmp.put_i16_le(self.aux1);
19794            __tmp.put_i16_le(self.aux2);
19795            __tmp.put_i16_le(self.aux3);
19796            __tmp.put_i16_le(self.aux4);
19797            __tmp.put_i16_le(self.aux5);
19798            __tmp.put_i16_le(self.aux6);
19799            let len = __tmp.len();
19800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19801        } else {
19802            __tmp.len()
19803        }
19804    }
19805}
19806#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19807#[doc = ""]
19808#[doc = "ID: 81"]
19809#[derive(Debug, Clone, PartialEq)]
19810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19812#[cfg_attr(feature = "ts", derive(TS))]
19813#[cfg_attr(feature = "ts", ts(export))]
19814pub struct MANUAL_SETPOINT_DATA {
19815    #[doc = "Timestamp (time since system boot)."]
19816    pub time_boot_ms: u32,
19817    #[doc = "Desired roll rate"]
19818    pub roll: f32,
19819    #[doc = "Desired pitch rate"]
19820    pub pitch: f32,
19821    #[doc = "Desired yaw rate"]
19822    pub yaw: f32,
19823    #[doc = "Collective thrust, normalized to 0 .. 1"]
19824    pub thrust: f32,
19825    #[doc = "Flight mode switch position, 0.. 255"]
19826    pub mode_switch: u8,
19827    #[doc = "Override mode switch position, 0.. 255"]
19828    pub manual_override_switch: u8,
19829}
19830impl MANUAL_SETPOINT_DATA {
19831    pub const ENCODED_LEN: usize = 22usize;
19832    pub const DEFAULT: Self = Self {
19833        time_boot_ms: 0_u32,
19834        roll: 0.0_f32,
19835        pitch: 0.0_f32,
19836        yaw: 0.0_f32,
19837        thrust: 0.0_f32,
19838        mode_switch: 0_u8,
19839        manual_override_switch: 0_u8,
19840    };
19841    #[cfg(feature = "arbitrary")]
19842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19843        use arbitrary::{Arbitrary, Unstructured};
19844        let mut buf = [0u8; 1024];
19845        rng.fill_bytes(&mut buf);
19846        let mut unstructured = Unstructured::new(&buf);
19847        Self::arbitrary(&mut unstructured).unwrap_or_default()
19848    }
19849}
19850impl Default for MANUAL_SETPOINT_DATA {
19851    fn default() -> Self {
19852        Self::DEFAULT.clone()
19853    }
19854}
19855impl MessageData for MANUAL_SETPOINT_DATA {
19856    type Message = MavMessage;
19857    const ID: u32 = 81u32;
19858    const NAME: &'static str = "MANUAL_SETPOINT";
19859    const EXTRA_CRC: u8 = 106u8;
19860    const ENCODED_LEN: usize = 22usize;
19861    fn deser(
19862        _version: MavlinkVersion,
19863        __input: &[u8],
19864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19865        let avail_len = __input.len();
19866        let mut payload_buf = [0; Self::ENCODED_LEN];
19867        let mut buf = if avail_len < Self::ENCODED_LEN {
19868            payload_buf[0..avail_len].copy_from_slice(__input);
19869            Bytes::new(&payload_buf)
19870        } else {
19871            Bytes::new(__input)
19872        };
19873        let mut __struct = Self::default();
19874        __struct.time_boot_ms = buf.get_u32_le();
19875        __struct.roll = buf.get_f32_le();
19876        __struct.pitch = buf.get_f32_le();
19877        __struct.yaw = buf.get_f32_le();
19878        __struct.thrust = buf.get_f32_le();
19879        __struct.mode_switch = buf.get_u8();
19880        __struct.manual_override_switch = buf.get_u8();
19881        Ok(__struct)
19882    }
19883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19884        let mut __tmp = BytesMut::new(bytes);
19885        #[allow(clippy::absurd_extreme_comparisons)]
19886        #[allow(unused_comparisons)]
19887        if __tmp.remaining() < Self::ENCODED_LEN {
19888            panic!(
19889                "buffer is too small (need {} bytes, but got {})",
19890                Self::ENCODED_LEN,
19891                __tmp.remaining(),
19892            )
19893        }
19894        __tmp.put_u32_le(self.time_boot_ms);
19895        __tmp.put_f32_le(self.roll);
19896        __tmp.put_f32_le(self.pitch);
19897        __tmp.put_f32_le(self.yaw);
19898        __tmp.put_f32_le(self.thrust);
19899        __tmp.put_u8(self.mode_switch);
19900        __tmp.put_u8(self.manual_override_switch);
19901        if matches!(version, MavlinkVersion::V2) {
19902            let len = __tmp.len();
19903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19904        } else {
19905            __tmp.len()
19906        }
19907    }
19908}
19909#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19910#[doc = ""]
19911#[doc = "ID: 249"]
19912#[derive(Debug, Clone, PartialEq)]
19913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19915#[cfg_attr(feature = "ts", derive(TS))]
19916#[cfg_attr(feature = "ts", ts(export))]
19917pub struct MEMORY_VECT_DATA {
19918    #[doc = "Starting address of the debug variables"]
19919    pub address: u16,
19920    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19921    pub ver: u8,
19922    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19923    pub mavtype: u8,
19924    #[doc = "Memory contents at specified address"]
19925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19926    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19927    pub value: [i8; 32],
19928}
19929impl MEMORY_VECT_DATA {
19930    pub const ENCODED_LEN: usize = 36usize;
19931    pub const DEFAULT: Self = Self {
19932        address: 0_u16,
19933        ver: 0_u8,
19934        mavtype: 0_u8,
19935        value: [0_i8; 32usize],
19936    };
19937    #[cfg(feature = "arbitrary")]
19938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19939        use arbitrary::{Arbitrary, Unstructured};
19940        let mut buf = [0u8; 1024];
19941        rng.fill_bytes(&mut buf);
19942        let mut unstructured = Unstructured::new(&buf);
19943        Self::arbitrary(&mut unstructured).unwrap_or_default()
19944    }
19945}
19946impl Default for MEMORY_VECT_DATA {
19947    fn default() -> Self {
19948        Self::DEFAULT.clone()
19949    }
19950}
19951impl MessageData for MEMORY_VECT_DATA {
19952    type Message = MavMessage;
19953    const ID: u32 = 249u32;
19954    const NAME: &'static str = "MEMORY_VECT";
19955    const EXTRA_CRC: u8 = 204u8;
19956    const ENCODED_LEN: usize = 36usize;
19957    fn deser(
19958        _version: MavlinkVersion,
19959        __input: &[u8],
19960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19961        let avail_len = __input.len();
19962        let mut payload_buf = [0; Self::ENCODED_LEN];
19963        let mut buf = if avail_len < Self::ENCODED_LEN {
19964            payload_buf[0..avail_len].copy_from_slice(__input);
19965            Bytes::new(&payload_buf)
19966        } else {
19967            Bytes::new(__input)
19968        };
19969        let mut __struct = Self::default();
19970        __struct.address = buf.get_u16_le();
19971        __struct.ver = buf.get_u8();
19972        __struct.mavtype = buf.get_u8();
19973        for v in &mut __struct.value {
19974            let val = buf.get_i8();
19975            *v = val;
19976        }
19977        Ok(__struct)
19978    }
19979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19980        let mut __tmp = BytesMut::new(bytes);
19981        #[allow(clippy::absurd_extreme_comparisons)]
19982        #[allow(unused_comparisons)]
19983        if __tmp.remaining() < Self::ENCODED_LEN {
19984            panic!(
19985                "buffer is too small (need {} bytes, but got {})",
19986                Self::ENCODED_LEN,
19987                __tmp.remaining(),
19988            )
19989        }
19990        __tmp.put_u16_le(self.address);
19991        __tmp.put_u8(self.ver);
19992        __tmp.put_u8(self.mavtype);
19993        for val in &self.value {
19994            __tmp.put_i8(*val);
19995        }
19996        if matches!(version, MavlinkVersion::V2) {
19997            let len = __tmp.len();
19998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19999        } else {
20000            __tmp.len()
20001        }
20002    }
20003}
20004#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20005#[doc = ""]
20006#[doc = "ID: 244"]
20007#[derive(Debug, Clone, PartialEq)]
20008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20010#[cfg_attr(feature = "ts", derive(TS))]
20011#[cfg_attr(feature = "ts", ts(export))]
20012pub struct MESSAGE_INTERVAL_DATA {
20013    #[doc = "0 indicates the interval at which it is sent."]
20014    pub interval_us: i32,
20015    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20016    pub message_id: u16,
20017}
20018impl MESSAGE_INTERVAL_DATA {
20019    pub const ENCODED_LEN: usize = 6usize;
20020    pub const DEFAULT: Self = Self {
20021        interval_us: 0_i32,
20022        message_id: 0_u16,
20023    };
20024    #[cfg(feature = "arbitrary")]
20025    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20026        use arbitrary::{Arbitrary, Unstructured};
20027        let mut buf = [0u8; 1024];
20028        rng.fill_bytes(&mut buf);
20029        let mut unstructured = Unstructured::new(&buf);
20030        Self::arbitrary(&mut unstructured).unwrap_or_default()
20031    }
20032}
20033impl Default for MESSAGE_INTERVAL_DATA {
20034    fn default() -> Self {
20035        Self::DEFAULT.clone()
20036    }
20037}
20038impl MessageData for MESSAGE_INTERVAL_DATA {
20039    type Message = MavMessage;
20040    const ID: u32 = 244u32;
20041    const NAME: &'static str = "MESSAGE_INTERVAL";
20042    const EXTRA_CRC: u8 = 95u8;
20043    const ENCODED_LEN: usize = 6usize;
20044    fn deser(
20045        _version: MavlinkVersion,
20046        __input: &[u8],
20047    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20048        let avail_len = __input.len();
20049        let mut payload_buf = [0; Self::ENCODED_LEN];
20050        let mut buf = if avail_len < Self::ENCODED_LEN {
20051            payload_buf[0..avail_len].copy_from_slice(__input);
20052            Bytes::new(&payload_buf)
20053        } else {
20054            Bytes::new(__input)
20055        };
20056        let mut __struct = Self::default();
20057        __struct.interval_us = buf.get_i32_le();
20058        __struct.message_id = buf.get_u16_le();
20059        Ok(__struct)
20060    }
20061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20062        let mut __tmp = BytesMut::new(bytes);
20063        #[allow(clippy::absurd_extreme_comparisons)]
20064        #[allow(unused_comparisons)]
20065        if __tmp.remaining() < Self::ENCODED_LEN {
20066            panic!(
20067                "buffer is too small (need {} bytes, but got {})",
20068                Self::ENCODED_LEN,
20069                __tmp.remaining(),
20070            )
20071        }
20072        __tmp.put_i32_le(self.interval_us);
20073        __tmp.put_u16_le(self.message_id);
20074        if matches!(version, MavlinkVersion::V2) {
20075            let len = __tmp.len();
20076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20077        } else {
20078            __tmp.len()
20079        }
20080    }
20081}
20082#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20083#[doc = ""]
20084#[doc = "ID: 47"]
20085#[derive(Debug, Clone, PartialEq)]
20086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20088#[cfg_attr(feature = "ts", derive(TS))]
20089#[cfg_attr(feature = "ts", ts(export))]
20090pub struct MISSION_ACK_DATA {
20091    #[doc = "System ID"]
20092    pub target_system: u8,
20093    #[doc = "Component ID"]
20094    pub target_component: u8,
20095    #[doc = "Mission result."]
20096    pub mavtype: MavMissionResult,
20097    #[doc = "Mission type."]
20098    #[cfg_attr(feature = "serde", serde(default))]
20099    pub mission_type: MavMissionType,
20100    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20102    pub opaque_id: u32,
20103}
20104impl MISSION_ACK_DATA {
20105    pub const ENCODED_LEN: usize = 8usize;
20106    pub const DEFAULT: Self = Self {
20107        target_system: 0_u8,
20108        target_component: 0_u8,
20109        mavtype: MavMissionResult::DEFAULT,
20110        mission_type: MavMissionType::DEFAULT,
20111        opaque_id: 0_u32,
20112    };
20113    #[cfg(feature = "arbitrary")]
20114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20115        use arbitrary::{Arbitrary, Unstructured};
20116        let mut buf = [0u8; 1024];
20117        rng.fill_bytes(&mut buf);
20118        let mut unstructured = Unstructured::new(&buf);
20119        Self::arbitrary(&mut unstructured).unwrap_or_default()
20120    }
20121}
20122impl Default for MISSION_ACK_DATA {
20123    fn default() -> Self {
20124        Self::DEFAULT.clone()
20125    }
20126}
20127impl MessageData for MISSION_ACK_DATA {
20128    type Message = MavMessage;
20129    const ID: u32 = 47u32;
20130    const NAME: &'static str = "MISSION_ACK";
20131    const EXTRA_CRC: u8 = 153u8;
20132    const ENCODED_LEN: usize = 8usize;
20133    fn deser(
20134        _version: MavlinkVersion,
20135        __input: &[u8],
20136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20137        let avail_len = __input.len();
20138        let mut payload_buf = [0; Self::ENCODED_LEN];
20139        let mut buf = if avail_len < Self::ENCODED_LEN {
20140            payload_buf[0..avail_len].copy_from_slice(__input);
20141            Bytes::new(&payload_buf)
20142        } else {
20143            Bytes::new(__input)
20144        };
20145        let mut __struct = Self::default();
20146        __struct.target_system = buf.get_u8();
20147        __struct.target_component = buf.get_u8();
20148        let tmp = buf.get_u8();
20149        __struct.mavtype =
20150            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20151                enum_type: "MavMissionResult",
20152                value: tmp as u32,
20153            })?;
20154        let tmp = buf.get_u8();
20155        __struct.mission_type =
20156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20157                enum_type: "MavMissionType",
20158                value: tmp as u32,
20159            })?;
20160        __struct.opaque_id = buf.get_u32_le();
20161        Ok(__struct)
20162    }
20163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20164        let mut __tmp = BytesMut::new(bytes);
20165        #[allow(clippy::absurd_extreme_comparisons)]
20166        #[allow(unused_comparisons)]
20167        if __tmp.remaining() < Self::ENCODED_LEN {
20168            panic!(
20169                "buffer is too small (need {} bytes, but got {})",
20170                Self::ENCODED_LEN,
20171                __tmp.remaining(),
20172            )
20173        }
20174        __tmp.put_u8(self.target_system);
20175        __tmp.put_u8(self.target_component);
20176        __tmp.put_u8(self.mavtype as u8);
20177        if matches!(version, MavlinkVersion::V2) {
20178            __tmp.put_u8(self.mission_type as u8);
20179            __tmp.put_u32_le(self.opaque_id);
20180            let len = __tmp.len();
20181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20182        } else {
20183            __tmp.len()
20184        }
20185    }
20186}
20187#[doc = "Delete all mission items at once."]
20188#[doc = ""]
20189#[doc = "ID: 45"]
20190#[derive(Debug, Clone, PartialEq)]
20191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20193#[cfg_attr(feature = "ts", derive(TS))]
20194#[cfg_attr(feature = "ts", ts(export))]
20195pub struct MISSION_CLEAR_ALL_DATA {
20196    #[doc = "System ID"]
20197    pub target_system: u8,
20198    #[doc = "Component ID"]
20199    pub target_component: u8,
20200    #[doc = "Mission type."]
20201    #[cfg_attr(feature = "serde", serde(default))]
20202    pub mission_type: MavMissionType,
20203}
20204impl MISSION_CLEAR_ALL_DATA {
20205    pub const ENCODED_LEN: usize = 3usize;
20206    pub const DEFAULT: Self = Self {
20207        target_system: 0_u8,
20208        target_component: 0_u8,
20209        mission_type: MavMissionType::DEFAULT,
20210    };
20211    #[cfg(feature = "arbitrary")]
20212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20213        use arbitrary::{Arbitrary, Unstructured};
20214        let mut buf = [0u8; 1024];
20215        rng.fill_bytes(&mut buf);
20216        let mut unstructured = Unstructured::new(&buf);
20217        Self::arbitrary(&mut unstructured).unwrap_or_default()
20218    }
20219}
20220impl Default for MISSION_CLEAR_ALL_DATA {
20221    fn default() -> Self {
20222        Self::DEFAULT.clone()
20223    }
20224}
20225impl MessageData for MISSION_CLEAR_ALL_DATA {
20226    type Message = MavMessage;
20227    const ID: u32 = 45u32;
20228    const NAME: &'static str = "MISSION_CLEAR_ALL";
20229    const EXTRA_CRC: u8 = 232u8;
20230    const ENCODED_LEN: usize = 3usize;
20231    fn deser(
20232        _version: MavlinkVersion,
20233        __input: &[u8],
20234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20235        let avail_len = __input.len();
20236        let mut payload_buf = [0; Self::ENCODED_LEN];
20237        let mut buf = if avail_len < Self::ENCODED_LEN {
20238            payload_buf[0..avail_len].copy_from_slice(__input);
20239            Bytes::new(&payload_buf)
20240        } else {
20241            Bytes::new(__input)
20242        };
20243        let mut __struct = Self::default();
20244        __struct.target_system = buf.get_u8();
20245        __struct.target_component = buf.get_u8();
20246        let tmp = buf.get_u8();
20247        __struct.mission_type =
20248            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20249                enum_type: "MavMissionType",
20250                value: tmp as u32,
20251            })?;
20252        Ok(__struct)
20253    }
20254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20255        let mut __tmp = BytesMut::new(bytes);
20256        #[allow(clippy::absurd_extreme_comparisons)]
20257        #[allow(unused_comparisons)]
20258        if __tmp.remaining() < Self::ENCODED_LEN {
20259            panic!(
20260                "buffer is too small (need {} bytes, but got {})",
20261                Self::ENCODED_LEN,
20262                __tmp.remaining(),
20263            )
20264        }
20265        __tmp.put_u8(self.target_system);
20266        __tmp.put_u8(self.target_component);
20267        if matches!(version, MavlinkVersion::V2) {
20268            __tmp.put_u8(self.mission_type as u8);
20269            let len = __tmp.len();
20270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20271        } else {
20272            __tmp.len()
20273        }
20274    }
20275}
20276#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20277#[doc = ""]
20278#[doc = "ID: 44"]
20279#[derive(Debug, Clone, PartialEq)]
20280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20282#[cfg_attr(feature = "ts", derive(TS))]
20283#[cfg_attr(feature = "ts", ts(export))]
20284pub struct MISSION_COUNT_DATA {
20285    #[doc = "Number of mission items in the sequence"]
20286    pub count: u16,
20287    #[doc = "System ID"]
20288    pub target_system: u8,
20289    #[doc = "Component ID"]
20290    pub target_component: u8,
20291    #[doc = "Mission type."]
20292    #[cfg_attr(feature = "serde", serde(default))]
20293    pub mission_type: MavMissionType,
20294    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20295    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20296    pub opaque_id: u32,
20297}
20298impl MISSION_COUNT_DATA {
20299    pub const ENCODED_LEN: usize = 9usize;
20300    pub const DEFAULT: Self = Self {
20301        count: 0_u16,
20302        target_system: 0_u8,
20303        target_component: 0_u8,
20304        mission_type: MavMissionType::DEFAULT,
20305        opaque_id: 0_u32,
20306    };
20307    #[cfg(feature = "arbitrary")]
20308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20309        use arbitrary::{Arbitrary, Unstructured};
20310        let mut buf = [0u8; 1024];
20311        rng.fill_bytes(&mut buf);
20312        let mut unstructured = Unstructured::new(&buf);
20313        Self::arbitrary(&mut unstructured).unwrap_or_default()
20314    }
20315}
20316impl Default for MISSION_COUNT_DATA {
20317    fn default() -> Self {
20318        Self::DEFAULT.clone()
20319    }
20320}
20321impl MessageData for MISSION_COUNT_DATA {
20322    type Message = MavMessage;
20323    const ID: u32 = 44u32;
20324    const NAME: &'static str = "MISSION_COUNT";
20325    const EXTRA_CRC: u8 = 221u8;
20326    const ENCODED_LEN: usize = 9usize;
20327    fn deser(
20328        _version: MavlinkVersion,
20329        __input: &[u8],
20330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20331        let avail_len = __input.len();
20332        let mut payload_buf = [0; Self::ENCODED_LEN];
20333        let mut buf = if avail_len < Self::ENCODED_LEN {
20334            payload_buf[0..avail_len].copy_from_slice(__input);
20335            Bytes::new(&payload_buf)
20336        } else {
20337            Bytes::new(__input)
20338        };
20339        let mut __struct = Self::default();
20340        __struct.count = buf.get_u16_le();
20341        __struct.target_system = buf.get_u8();
20342        __struct.target_component = buf.get_u8();
20343        let tmp = buf.get_u8();
20344        __struct.mission_type =
20345            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20346                enum_type: "MavMissionType",
20347                value: tmp as u32,
20348            })?;
20349        __struct.opaque_id = buf.get_u32_le();
20350        Ok(__struct)
20351    }
20352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20353        let mut __tmp = BytesMut::new(bytes);
20354        #[allow(clippy::absurd_extreme_comparisons)]
20355        #[allow(unused_comparisons)]
20356        if __tmp.remaining() < Self::ENCODED_LEN {
20357            panic!(
20358                "buffer is too small (need {} bytes, but got {})",
20359                Self::ENCODED_LEN,
20360                __tmp.remaining(),
20361            )
20362        }
20363        __tmp.put_u16_le(self.count);
20364        __tmp.put_u8(self.target_system);
20365        __tmp.put_u8(self.target_component);
20366        if matches!(version, MavlinkVersion::V2) {
20367            __tmp.put_u8(self.mission_type as u8);
20368            __tmp.put_u32_le(self.opaque_id);
20369            let len = __tmp.len();
20370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20371        } else {
20372            __tmp.len()
20373        }
20374    }
20375}
20376#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20377#[doc = ""]
20378#[doc = "ID: 42"]
20379#[derive(Debug, Clone, PartialEq)]
20380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20382#[cfg_attr(feature = "ts", derive(TS))]
20383#[cfg_attr(feature = "ts", ts(export))]
20384pub struct MISSION_CURRENT_DATA {
20385    #[doc = "Sequence"]
20386    pub seq: u16,
20387    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20389    pub total: u16,
20390    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20391    #[cfg_attr(feature = "serde", serde(default))]
20392    pub mission_state: MissionState,
20393    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20394    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20395    pub mission_mode: u8,
20396    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20398    pub mission_id: u32,
20399    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20401    pub fence_id: u32,
20402    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20404    pub rally_points_id: u32,
20405}
20406impl MISSION_CURRENT_DATA {
20407    pub const ENCODED_LEN: usize = 18usize;
20408    pub const DEFAULT: Self = Self {
20409        seq: 0_u16,
20410        total: 0_u16,
20411        mission_state: MissionState::DEFAULT,
20412        mission_mode: 0_u8,
20413        mission_id: 0_u32,
20414        fence_id: 0_u32,
20415        rally_points_id: 0_u32,
20416    };
20417    #[cfg(feature = "arbitrary")]
20418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20419        use arbitrary::{Arbitrary, Unstructured};
20420        let mut buf = [0u8; 1024];
20421        rng.fill_bytes(&mut buf);
20422        let mut unstructured = Unstructured::new(&buf);
20423        Self::arbitrary(&mut unstructured).unwrap_or_default()
20424    }
20425}
20426impl Default for MISSION_CURRENT_DATA {
20427    fn default() -> Self {
20428        Self::DEFAULT.clone()
20429    }
20430}
20431impl MessageData for MISSION_CURRENT_DATA {
20432    type Message = MavMessage;
20433    const ID: u32 = 42u32;
20434    const NAME: &'static str = "MISSION_CURRENT";
20435    const EXTRA_CRC: u8 = 28u8;
20436    const ENCODED_LEN: usize = 18usize;
20437    fn deser(
20438        _version: MavlinkVersion,
20439        __input: &[u8],
20440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20441        let avail_len = __input.len();
20442        let mut payload_buf = [0; Self::ENCODED_LEN];
20443        let mut buf = if avail_len < Self::ENCODED_LEN {
20444            payload_buf[0..avail_len].copy_from_slice(__input);
20445            Bytes::new(&payload_buf)
20446        } else {
20447            Bytes::new(__input)
20448        };
20449        let mut __struct = Self::default();
20450        __struct.seq = buf.get_u16_le();
20451        __struct.total = buf.get_u16_le();
20452        let tmp = buf.get_u8();
20453        __struct.mission_state =
20454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20455                enum_type: "MissionState",
20456                value: tmp as u32,
20457            })?;
20458        __struct.mission_mode = buf.get_u8();
20459        __struct.mission_id = buf.get_u32_le();
20460        __struct.fence_id = buf.get_u32_le();
20461        __struct.rally_points_id = buf.get_u32_le();
20462        Ok(__struct)
20463    }
20464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20465        let mut __tmp = BytesMut::new(bytes);
20466        #[allow(clippy::absurd_extreme_comparisons)]
20467        #[allow(unused_comparisons)]
20468        if __tmp.remaining() < Self::ENCODED_LEN {
20469            panic!(
20470                "buffer is too small (need {} bytes, but got {})",
20471                Self::ENCODED_LEN,
20472                __tmp.remaining(),
20473            )
20474        }
20475        __tmp.put_u16_le(self.seq);
20476        if matches!(version, MavlinkVersion::V2) {
20477            __tmp.put_u16_le(self.total);
20478            __tmp.put_u8(self.mission_state as u8);
20479            __tmp.put_u8(self.mission_mode);
20480            __tmp.put_u32_le(self.mission_id);
20481            __tmp.put_u32_le(self.fence_id);
20482            __tmp.put_u32_le(self.rally_points_id);
20483            let len = __tmp.len();
20484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20485        } else {
20486            __tmp.len()
20487        }
20488    }
20489}
20490#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20491#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20492#[doc = ""]
20493#[doc = "ID: 39"]
20494#[derive(Debug, Clone, PartialEq)]
20495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20497#[cfg_attr(feature = "ts", derive(TS))]
20498#[cfg_attr(feature = "ts", ts(export))]
20499pub struct MISSION_ITEM_DATA {
20500    #[doc = "PARAM1, see MAV_CMD enum"]
20501    pub param1: f32,
20502    #[doc = "PARAM2, see MAV_CMD enum"]
20503    pub param2: f32,
20504    #[doc = "PARAM3, see MAV_CMD enum"]
20505    pub param3: f32,
20506    #[doc = "PARAM4, see MAV_CMD enum"]
20507    pub param4: f32,
20508    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20509    pub x: f32,
20510    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20511    pub y: f32,
20512    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20513    pub z: f32,
20514    #[doc = "Sequence"]
20515    pub seq: u16,
20516    #[doc = "The scheduled action for the waypoint."]
20517    pub command: MavCmd,
20518    #[doc = "System ID"]
20519    pub target_system: u8,
20520    #[doc = "Component ID"]
20521    pub target_component: u8,
20522    #[doc = "The coordinate system of the waypoint."]
20523    pub frame: MavFrame,
20524    #[doc = "false:0, true:1"]
20525    pub current: u8,
20526    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20527    pub autocontinue: u8,
20528    #[doc = "Mission type."]
20529    #[cfg_attr(feature = "serde", serde(default))]
20530    pub mission_type: MavMissionType,
20531}
20532impl MISSION_ITEM_DATA {
20533    pub const ENCODED_LEN: usize = 38usize;
20534    pub const DEFAULT: Self = Self {
20535        param1: 0.0_f32,
20536        param2: 0.0_f32,
20537        param3: 0.0_f32,
20538        param4: 0.0_f32,
20539        x: 0.0_f32,
20540        y: 0.0_f32,
20541        z: 0.0_f32,
20542        seq: 0_u16,
20543        command: MavCmd::DEFAULT,
20544        target_system: 0_u8,
20545        target_component: 0_u8,
20546        frame: MavFrame::DEFAULT,
20547        current: 0_u8,
20548        autocontinue: 0_u8,
20549        mission_type: MavMissionType::DEFAULT,
20550    };
20551    #[cfg(feature = "arbitrary")]
20552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20553        use arbitrary::{Arbitrary, Unstructured};
20554        let mut buf = [0u8; 1024];
20555        rng.fill_bytes(&mut buf);
20556        let mut unstructured = Unstructured::new(&buf);
20557        Self::arbitrary(&mut unstructured).unwrap_or_default()
20558    }
20559}
20560impl Default for MISSION_ITEM_DATA {
20561    fn default() -> Self {
20562        Self::DEFAULT.clone()
20563    }
20564}
20565impl MessageData for MISSION_ITEM_DATA {
20566    type Message = MavMessage;
20567    const ID: u32 = 39u32;
20568    const NAME: &'static str = "MISSION_ITEM";
20569    const EXTRA_CRC: u8 = 254u8;
20570    const ENCODED_LEN: usize = 38usize;
20571    fn deser(
20572        _version: MavlinkVersion,
20573        __input: &[u8],
20574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20575        let avail_len = __input.len();
20576        let mut payload_buf = [0; Self::ENCODED_LEN];
20577        let mut buf = if avail_len < Self::ENCODED_LEN {
20578            payload_buf[0..avail_len].copy_from_slice(__input);
20579            Bytes::new(&payload_buf)
20580        } else {
20581            Bytes::new(__input)
20582        };
20583        let mut __struct = Self::default();
20584        __struct.param1 = buf.get_f32_le();
20585        __struct.param2 = buf.get_f32_le();
20586        __struct.param3 = buf.get_f32_le();
20587        __struct.param4 = buf.get_f32_le();
20588        __struct.x = buf.get_f32_le();
20589        __struct.y = buf.get_f32_le();
20590        __struct.z = buf.get_f32_le();
20591        __struct.seq = buf.get_u16_le();
20592        let tmp = buf.get_u16_le();
20593        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20594            ::mavlink_core::error::ParserError::InvalidEnum {
20595                enum_type: "MavCmd",
20596                value: tmp as u32,
20597            },
20598        )?;
20599        __struct.target_system = buf.get_u8();
20600        __struct.target_component = buf.get_u8();
20601        let tmp = buf.get_u8();
20602        __struct.frame =
20603            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20604                enum_type: "MavFrame",
20605                value: tmp as u32,
20606            })?;
20607        __struct.current = buf.get_u8();
20608        __struct.autocontinue = buf.get_u8();
20609        let tmp = buf.get_u8();
20610        __struct.mission_type =
20611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20612                enum_type: "MavMissionType",
20613                value: tmp as u32,
20614            })?;
20615        Ok(__struct)
20616    }
20617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20618        let mut __tmp = BytesMut::new(bytes);
20619        #[allow(clippy::absurd_extreme_comparisons)]
20620        #[allow(unused_comparisons)]
20621        if __tmp.remaining() < Self::ENCODED_LEN {
20622            panic!(
20623                "buffer is too small (need {} bytes, but got {})",
20624                Self::ENCODED_LEN,
20625                __tmp.remaining(),
20626            )
20627        }
20628        __tmp.put_f32_le(self.param1);
20629        __tmp.put_f32_le(self.param2);
20630        __tmp.put_f32_le(self.param3);
20631        __tmp.put_f32_le(self.param4);
20632        __tmp.put_f32_le(self.x);
20633        __tmp.put_f32_le(self.y);
20634        __tmp.put_f32_le(self.z);
20635        __tmp.put_u16_le(self.seq);
20636        __tmp.put_u16_le(self.command as u16);
20637        __tmp.put_u8(self.target_system);
20638        __tmp.put_u8(self.target_component);
20639        __tmp.put_u8(self.frame as u8);
20640        __tmp.put_u8(self.current);
20641        __tmp.put_u8(self.autocontinue);
20642        if matches!(version, MavlinkVersion::V2) {
20643            __tmp.put_u8(self.mission_type as u8);
20644            let len = __tmp.len();
20645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20646        } else {
20647            __tmp.len()
20648        }
20649    }
20650}
20651#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20652#[doc = ""]
20653#[doc = "ID: 73"]
20654#[derive(Debug, Clone, PartialEq)]
20655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20657#[cfg_attr(feature = "ts", derive(TS))]
20658#[cfg_attr(feature = "ts", ts(export))]
20659pub struct MISSION_ITEM_INT_DATA {
20660    #[doc = "PARAM1, see MAV_CMD enum"]
20661    pub param1: f32,
20662    #[doc = "PARAM2, see MAV_CMD enum"]
20663    pub param2: f32,
20664    #[doc = "PARAM3, see MAV_CMD enum"]
20665    pub param3: f32,
20666    #[doc = "PARAM4, see MAV_CMD enum"]
20667    pub param4: f32,
20668    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20669    pub x: i32,
20670    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20671    pub y: i32,
20672    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20673    pub z: f32,
20674    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20675    pub seq: u16,
20676    #[doc = "The scheduled action for the waypoint."]
20677    pub command: MavCmd,
20678    #[doc = "System ID"]
20679    pub target_system: u8,
20680    #[doc = "Component ID"]
20681    pub target_component: u8,
20682    #[doc = "The coordinate system of the waypoint."]
20683    pub frame: MavFrame,
20684    #[doc = "false:0, true:1"]
20685    pub current: u8,
20686    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20687    pub autocontinue: u8,
20688    #[doc = "Mission type."]
20689    #[cfg_attr(feature = "serde", serde(default))]
20690    pub mission_type: MavMissionType,
20691}
20692impl MISSION_ITEM_INT_DATA {
20693    pub const ENCODED_LEN: usize = 38usize;
20694    pub const DEFAULT: Self = Self {
20695        param1: 0.0_f32,
20696        param2: 0.0_f32,
20697        param3: 0.0_f32,
20698        param4: 0.0_f32,
20699        x: 0_i32,
20700        y: 0_i32,
20701        z: 0.0_f32,
20702        seq: 0_u16,
20703        command: MavCmd::DEFAULT,
20704        target_system: 0_u8,
20705        target_component: 0_u8,
20706        frame: MavFrame::DEFAULT,
20707        current: 0_u8,
20708        autocontinue: 0_u8,
20709        mission_type: MavMissionType::DEFAULT,
20710    };
20711    #[cfg(feature = "arbitrary")]
20712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20713        use arbitrary::{Arbitrary, Unstructured};
20714        let mut buf = [0u8; 1024];
20715        rng.fill_bytes(&mut buf);
20716        let mut unstructured = Unstructured::new(&buf);
20717        Self::arbitrary(&mut unstructured).unwrap_or_default()
20718    }
20719}
20720impl Default for MISSION_ITEM_INT_DATA {
20721    fn default() -> Self {
20722        Self::DEFAULT.clone()
20723    }
20724}
20725impl MessageData for MISSION_ITEM_INT_DATA {
20726    type Message = MavMessage;
20727    const ID: u32 = 73u32;
20728    const NAME: &'static str = "MISSION_ITEM_INT";
20729    const EXTRA_CRC: u8 = 38u8;
20730    const ENCODED_LEN: usize = 38usize;
20731    fn deser(
20732        _version: MavlinkVersion,
20733        __input: &[u8],
20734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20735        let avail_len = __input.len();
20736        let mut payload_buf = [0; Self::ENCODED_LEN];
20737        let mut buf = if avail_len < Self::ENCODED_LEN {
20738            payload_buf[0..avail_len].copy_from_slice(__input);
20739            Bytes::new(&payload_buf)
20740        } else {
20741            Bytes::new(__input)
20742        };
20743        let mut __struct = Self::default();
20744        __struct.param1 = buf.get_f32_le();
20745        __struct.param2 = buf.get_f32_le();
20746        __struct.param3 = buf.get_f32_le();
20747        __struct.param4 = buf.get_f32_le();
20748        __struct.x = buf.get_i32_le();
20749        __struct.y = buf.get_i32_le();
20750        __struct.z = buf.get_f32_le();
20751        __struct.seq = buf.get_u16_le();
20752        let tmp = buf.get_u16_le();
20753        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20754            ::mavlink_core::error::ParserError::InvalidEnum {
20755                enum_type: "MavCmd",
20756                value: tmp as u32,
20757            },
20758        )?;
20759        __struct.target_system = buf.get_u8();
20760        __struct.target_component = buf.get_u8();
20761        let tmp = buf.get_u8();
20762        __struct.frame =
20763            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20764                enum_type: "MavFrame",
20765                value: tmp as u32,
20766            })?;
20767        __struct.current = buf.get_u8();
20768        __struct.autocontinue = buf.get_u8();
20769        let tmp = buf.get_u8();
20770        __struct.mission_type =
20771            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20772                enum_type: "MavMissionType",
20773                value: tmp as u32,
20774            })?;
20775        Ok(__struct)
20776    }
20777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20778        let mut __tmp = BytesMut::new(bytes);
20779        #[allow(clippy::absurd_extreme_comparisons)]
20780        #[allow(unused_comparisons)]
20781        if __tmp.remaining() < Self::ENCODED_LEN {
20782            panic!(
20783                "buffer is too small (need {} bytes, but got {})",
20784                Self::ENCODED_LEN,
20785                __tmp.remaining(),
20786            )
20787        }
20788        __tmp.put_f32_le(self.param1);
20789        __tmp.put_f32_le(self.param2);
20790        __tmp.put_f32_le(self.param3);
20791        __tmp.put_f32_le(self.param4);
20792        __tmp.put_i32_le(self.x);
20793        __tmp.put_i32_le(self.y);
20794        __tmp.put_f32_le(self.z);
20795        __tmp.put_u16_le(self.seq);
20796        __tmp.put_u16_le(self.command as u16);
20797        __tmp.put_u8(self.target_system);
20798        __tmp.put_u8(self.target_component);
20799        __tmp.put_u8(self.frame as u8);
20800        __tmp.put_u8(self.current);
20801        __tmp.put_u8(self.autocontinue);
20802        if matches!(version, MavlinkVersion::V2) {
20803            __tmp.put_u8(self.mission_type as u8);
20804            let len = __tmp.len();
20805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20806        } else {
20807            __tmp.len()
20808        }
20809    }
20810}
20811#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20812#[doc = ""]
20813#[doc = "ID: 46"]
20814#[derive(Debug, Clone, PartialEq)]
20815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20817#[cfg_attr(feature = "ts", derive(TS))]
20818#[cfg_attr(feature = "ts", ts(export))]
20819pub struct MISSION_ITEM_REACHED_DATA {
20820    #[doc = "Sequence"]
20821    pub seq: u16,
20822}
20823impl MISSION_ITEM_REACHED_DATA {
20824    pub const ENCODED_LEN: usize = 2usize;
20825    pub const DEFAULT: Self = Self { seq: 0_u16 };
20826    #[cfg(feature = "arbitrary")]
20827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20828        use arbitrary::{Arbitrary, Unstructured};
20829        let mut buf = [0u8; 1024];
20830        rng.fill_bytes(&mut buf);
20831        let mut unstructured = Unstructured::new(&buf);
20832        Self::arbitrary(&mut unstructured).unwrap_or_default()
20833    }
20834}
20835impl Default for MISSION_ITEM_REACHED_DATA {
20836    fn default() -> Self {
20837        Self::DEFAULT.clone()
20838    }
20839}
20840impl MessageData for MISSION_ITEM_REACHED_DATA {
20841    type Message = MavMessage;
20842    const ID: u32 = 46u32;
20843    const NAME: &'static str = "MISSION_ITEM_REACHED";
20844    const EXTRA_CRC: u8 = 11u8;
20845    const ENCODED_LEN: usize = 2usize;
20846    fn deser(
20847        _version: MavlinkVersion,
20848        __input: &[u8],
20849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20850        let avail_len = __input.len();
20851        let mut payload_buf = [0; Self::ENCODED_LEN];
20852        let mut buf = if avail_len < Self::ENCODED_LEN {
20853            payload_buf[0..avail_len].copy_from_slice(__input);
20854            Bytes::new(&payload_buf)
20855        } else {
20856            Bytes::new(__input)
20857        };
20858        let mut __struct = Self::default();
20859        __struct.seq = buf.get_u16_le();
20860        Ok(__struct)
20861    }
20862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20863        let mut __tmp = BytesMut::new(bytes);
20864        #[allow(clippy::absurd_extreme_comparisons)]
20865        #[allow(unused_comparisons)]
20866        if __tmp.remaining() < Self::ENCODED_LEN {
20867            panic!(
20868                "buffer is too small (need {} bytes, but got {})",
20869                Self::ENCODED_LEN,
20870                __tmp.remaining(),
20871            )
20872        }
20873        __tmp.put_u16_le(self.seq);
20874        if matches!(version, MavlinkVersion::V2) {
20875            let len = __tmp.len();
20876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20877        } else {
20878            __tmp.len()
20879        }
20880    }
20881}
20882#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20883#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20884#[doc = ""]
20885#[doc = "ID: 40"]
20886#[derive(Debug, Clone, PartialEq)]
20887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20889#[cfg_attr(feature = "ts", derive(TS))]
20890#[cfg_attr(feature = "ts", ts(export))]
20891pub struct MISSION_REQUEST_DATA {
20892    #[doc = "Sequence"]
20893    pub seq: u16,
20894    #[doc = "System ID"]
20895    pub target_system: u8,
20896    #[doc = "Component ID"]
20897    pub target_component: u8,
20898    #[doc = "Mission type."]
20899    #[cfg_attr(feature = "serde", serde(default))]
20900    pub mission_type: MavMissionType,
20901}
20902impl MISSION_REQUEST_DATA {
20903    pub const ENCODED_LEN: usize = 5usize;
20904    pub const DEFAULT: Self = Self {
20905        seq: 0_u16,
20906        target_system: 0_u8,
20907        target_component: 0_u8,
20908        mission_type: MavMissionType::DEFAULT,
20909    };
20910    #[cfg(feature = "arbitrary")]
20911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20912        use arbitrary::{Arbitrary, Unstructured};
20913        let mut buf = [0u8; 1024];
20914        rng.fill_bytes(&mut buf);
20915        let mut unstructured = Unstructured::new(&buf);
20916        Self::arbitrary(&mut unstructured).unwrap_or_default()
20917    }
20918}
20919impl Default for MISSION_REQUEST_DATA {
20920    fn default() -> Self {
20921        Self::DEFAULT.clone()
20922    }
20923}
20924impl MessageData for MISSION_REQUEST_DATA {
20925    type Message = MavMessage;
20926    const ID: u32 = 40u32;
20927    const NAME: &'static str = "MISSION_REQUEST";
20928    const EXTRA_CRC: u8 = 230u8;
20929    const ENCODED_LEN: usize = 5usize;
20930    fn deser(
20931        _version: MavlinkVersion,
20932        __input: &[u8],
20933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20934        let avail_len = __input.len();
20935        let mut payload_buf = [0; Self::ENCODED_LEN];
20936        let mut buf = if avail_len < Self::ENCODED_LEN {
20937            payload_buf[0..avail_len].copy_from_slice(__input);
20938            Bytes::new(&payload_buf)
20939        } else {
20940            Bytes::new(__input)
20941        };
20942        let mut __struct = Self::default();
20943        __struct.seq = buf.get_u16_le();
20944        __struct.target_system = buf.get_u8();
20945        __struct.target_component = buf.get_u8();
20946        let tmp = buf.get_u8();
20947        __struct.mission_type =
20948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20949                enum_type: "MavMissionType",
20950                value: tmp as u32,
20951            })?;
20952        Ok(__struct)
20953    }
20954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20955        let mut __tmp = BytesMut::new(bytes);
20956        #[allow(clippy::absurd_extreme_comparisons)]
20957        #[allow(unused_comparisons)]
20958        if __tmp.remaining() < Self::ENCODED_LEN {
20959            panic!(
20960                "buffer is too small (need {} bytes, but got {})",
20961                Self::ENCODED_LEN,
20962                __tmp.remaining(),
20963            )
20964        }
20965        __tmp.put_u16_le(self.seq);
20966        __tmp.put_u8(self.target_system);
20967        __tmp.put_u8(self.target_component);
20968        if matches!(version, MavlinkVersion::V2) {
20969            __tmp.put_u8(self.mission_type as u8);
20970            let len = __tmp.len();
20971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20972        } else {
20973            __tmp.len()
20974        }
20975    }
20976}
20977#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20978#[doc = ""]
20979#[doc = "ID: 51"]
20980#[derive(Debug, Clone, PartialEq)]
20981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20983#[cfg_attr(feature = "ts", derive(TS))]
20984#[cfg_attr(feature = "ts", ts(export))]
20985pub struct MISSION_REQUEST_INT_DATA {
20986    #[doc = "Sequence"]
20987    pub seq: u16,
20988    #[doc = "System ID"]
20989    pub target_system: u8,
20990    #[doc = "Component ID"]
20991    pub target_component: u8,
20992    #[doc = "Mission type."]
20993    #[cfg_attr(feature = "serde", serde(default))]
20994    pub mission_type: MavMissionType,
20995}
20996impl MISSION_REQUEST_INT_DATA {
20997    pub const ENCODED_LEN: usize = 5usize;
20998    pub const DEFAULT: Self = Self {
20999        seq: 0_u16,
21000        target_system: 0_u8,
21001        target_component: 0_u8,
21002        mission_type: MavMissionType::DEFAULT,
21003    };
21004    #[cfg(feature = "arbitrary")]
21005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21006        use arbitrary::{Arbitrary, Unstructured};
21007        let mut buf = [0u8; 1024];
21008        rng.fill_bytes(&mut buf);
21009        let mut unstructured = Unstructured::new(&buf);
21010        Self::arbitrary(&mut unstructured).unwrap_or_default()
21011    }
21012}
21013impl Default for MISSION_REQUEST_INT_DATA {
21014    fn default() -> Self {
21015        Self::DEFAULT.clone()
21016    }
21017}
21018impl MessageData for MISSION_REQUEST_INT_DATA {
21019    type Message = MavMessage;
21020    const ID: u32 = 51u32;
21021    const NAME: &'static str = "MISSION_REQUEST_INT";
21022    const EXTRA_CRC: u8 = 196u8;
21023    const ENCODED_LEN: usize = 5usize;
21024    fn deser(
21025        _version: MavlinkVersion,
21026        __input: &[u8],
21027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21028        let avail_len = __input.len();
21029        let mut payload_buf = [0; Self::ENCODED_LEN];
21030        let mut buf = if avail_len < Self::ENCODED_LEN {
21031            payload_buf[0..avail_len].copy_from_slice(__input);
21032            Bytes::new(&payload_buf)
21033        } else {
21034            Bytes::new(__input)
21035        };
21036        let mut __struct = Self::default();
21037        __struct.seq = buf.get_u16_le();
21038        __struct.target_system = buf.get_u8();
21039        __struct.target_component = buf.get_u8();
21040        let tmp = buf.get_u8();
21041        __struct.mission_type =
21042            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21043                enum_type: "MavMissionType",
21044                value: tmp as u32,
21045            })?;
21046        Ok(__struct)
21047    }
21048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21049        let mut __tmp = BytesMut::new(bytes);
21050        #[allow(clippy::absurd_extreme_comparisons)]
21051        #[allow(unused_comparisons)]
21052        if __tmp.remaining() < Self::ENCODED_LEN {
21053            panic!(
21054                "buffer is too small (need {} bytes, but got {})",
21055                Self::ENCODED_LEN,
21056                __tmp.remaining(),
21057            )
21058        }
21059        __tmp.put_u16_le(self.seq);
21060        __tmp.put_u8(self.target_system);
21061        __tmp.put_u8(self.target_component);
21062        if matches!(version, MavlinkVersion::V2) {
21063            __tmp.put_u8(self.mission_type as u8);
21064            let len = __tmp.len();
21065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21066        } else {
21067            __tmp.len()
21068        }
21069    }
21070}
21071#[doc = "Request the overall list of mission items from the system/component."]
21072#[doc = ""]
21073#[doc = "ID: 43"]
21074#[derive(Debug, Clone, PartialEq)]
21075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21077#[cfg_attr(feature = "ts", derive(TS))]
21078#[cfg_attr(feature = "ts", ts(export))]
21079pub struct MISSION_REQUEST_LIST_DATA {
21080    #[doc = "System ID"]
21081    pub target_system: u8,
21082    #[doc = "Component ID"]
21083    pub target_component: u8,
21084    #[doc = "Mission type."]
21085    #[cfg_attr(feature = "serde", serde(default))]
21086    pub mission_type: MavMissionType,
21087}
21088impl MISSION_REQUEST_LIST_DATA {
21089    pub const ENCODED_LEN: usize = 3usize;
21090    pub const DEFAULT: Self = Self {
21091        target_system: 0_u8,
21092        target_component: 0_u8,
21093        mission_type: MavMissionType::DEFAULT,
21094    };
21095    #[cfg(feature = "arbitrary")]
21096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21097        use arbitrary::{Arbitrary, Unstructured};
21098        let mut buf = [0u8; 1024];
21099        rng.fill_bytes(&mut buf);
21100        let mut unstructured = Unstructured::new(&buf);
21101        Self::arbitrary(&mut unstructured).unwrap_or_default()
21102    }
21103}
21104impl Default for MISSION_REQUEST_LIST_DATA {
21105    fn default() -> Self {
21106        Self::DEFAULT.clone()
21107    }
21108}
21109impl MessageData for MISSION_REQUEST_LIST_DATA {
21110    type Message = MavMessage;
21111    const ID: u32 = 43u32;
21112    const NAME: &'static str = "MISSION_REQUEST_LIST";
21113    const EXTRA_CRC: u8 = 132u8;
21114    const ENCODED_LEN: usize = 3usize;
21115    fn deser(
21116        _version: MavlinkVersion,
21117        __input: &[u8],
21118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21119        let avail_len = __input.len();
21120        let mut payload_buf = [0; Self::ENCODED_LEN];
21121        let mut buf = if avail_len < Self::ENCODED_LEN {
21122            payload_buf[0..avail_len].copy_from_slice(__input);
21123            Bytes::new(&payload_buf)
21124        } else {
21125            Bytes::new(__input)
21126        };
21127        let mut __struct = Self::default();
21128        __struct.target_system = buf.get_u8();
21129        __struct.target_component = buf.get_u8();
21130        let tmp = buf.get_u8();
21131        __struct.mission_type =
21132            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21133                enum_type: "MavMissionType",
21134                value: tmp as u32,
21135            })?;
21136        Ok(__struct)
21137    }
21138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21139        let mut __tmp = BytesMut::new(bytes);
21140        #[allow(clippy::absurd_extreme_comparisons)]
21141        #[allow(unused_comparisons)]
21142        if __tmp.remaining() < Self::ENCODED_LEN {
21143            panic!(
21144                "buffer is too small (need {} bytes, but got {})",
21145                Self::ENCODED_LEN,
21146                __tmp.remaining(),
21147            )
21148        }
21149        __tmp.put_u8(self.target_system);
21150        __tmp.put_u8(self.target_component);
21151        if matches!(version, MavlinkVersion::V2) {
21152            __tmp.put_u8(self.mission_type as u8);
21153            let len = __tmp.len();
21154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21155        } else {
21156            __tmp.len()
21157        }
21158    }
21159}
21160#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21161#[doc = ""]
21162#[doc = "ID: 37"]
21163#[derive(Debug, Clone, PartialEq)]
21164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21166#[cfg_attr(feature = "ts", derive(TS))]
21167#[cfg_attr(feature = "ts", ts(export))]
21168pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21169    #[doc = "Start index"]
21170    pub start_index: i16,
21171    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21172    pub end_index: i16,
21173    #[doc = "System ID"]
21174    pub target_system: u8,
21175    #[doc = "Component ID"]
21176    pub target_component: u8,
21177    #[doc = "Mission type."]
21178    #[cfg_attr(feature = "serde", serde(default))]
21179    pub mission_type: MavMissionType,
21180}
21181impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21182    pub const ENCODED_LEN: usize = 7usize;
21183    pub const DEFAULT: Self = Self {
21184        start_index: 0_i16,
21185        end_index: 0_i16,
21186        target_system: 0_u8,
21187        target_component: 0_u8,
21188        mission_type: MavMissionType::DEFAULT,
21189    };
21190    #[cfg(feature = "arbitrary")]
21191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21192        use arbitrary::{Arbitrary, Unstructured};
21193        let mut buf = [0u8; 1024];
21194        rng.fill_bytes(&mut buf);
21195        let mut unstructured = Unstructured::new(&buf);
21196        Self::arbitrary(&mut unstructured).unwrap_or_default()
21197    }
21198}
21199impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21200    fn default() -> Self {
21201        Self::DEFAULT.clone()
21202    }
21203}
21204impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21205    type Message = MavMessage;
21206    const ID: u32 = 37u32;
21207    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21208    const EXTRA_CRC: u8 = 212u8;
21209    const ENCODED_LEN: usize = 7usize;
21210    fn deser(
21211        _version: MavlinkVersion,
21212        __input: &[u8],
21213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21214        let avail_len = __input.len();
21215        let mut payload_buf = [0; Self::ENCODED_LEN];
21216        let mut buf = if avail_len < Self::ENCODED_LEN {
21217            payload_buf[0..avail_len].copy_from_slice(__input);
21218            Bytes::new(&payload_buf)
21219        } else {
21220            Bytes::new(__input)
21221        };
21222        let mut __struct = Self::default();
21223        __struct.start_index = buf.get_i16_le();
21224        __struct.end_index = buf.get_i16_le();
21225        __struct.target_system = buf.get_u8();
21226        __struct.target_component = buf.get_u8();
21227        let tmp = buf.get_u8();
21228        __struct.mission_type =
21229            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21230                enum_type: "MavMissionType",
21231                value: tmp as u32,
21232            })?;
21233        Ok(__struct)
21234    }
21235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21236        let mut __tmp = BytesMut::new(bytes);
21237        #[allow(clippy::absurd_extreme_comparisons)]
21238        #[allow(unused_comparisons)]
21239        if __tmp.remaining() < Self::ENCODED_LEN {
21240            panic!(
21241                "buffer is too small (need {} bytes, but got {})",
21242                Self::ENCODED_LEN,
21243                __tmp.remaining(),
21244            )
21245        }
21246        __tmp.put_i16_le(self.start_index);
21247        __tmp.put_i16_le(self.end_index);
21248        __tmp.put_u8(self.target_system);
21249        __tmp.put_u8(self.target_component);
21250        if matches!(version, MavlinkVersion::V2) {
21251            __tmp.put_u8(self.mission_type as u8);
21252            let len = __tmp.len();
21253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21254        } else {
21255            __tmp.len()
21256        }
21257    }
21258}
21259#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21260#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21261#[doc = ""]
21262#[doc = "ID: 41"]
21263#[derive(Debug, Clone, PartialEq)]
21264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21266#[cfg_attr(feature = "ts", derive(TS))]
21267#[cfg_attr(feature = "ts", ts(export))]
21268pub struct MISSION_SET_CURRENT_DATA {
21269    #[doc = "Sequence"]
21270    pub seq: u16,
21271    #[doc = "System ID"]
21272    pub target_system: u8,
21273    #[doc = "Component ID"]
21274    pub target_component: u8,
21275}
21276impl MISSION_SET_CURRENT_DATA {
21277    pub const ENCODED_LEN: usize = 4usize;
21278    pub const DEFAULT: Self = Self {
21279        seq: 0_u16,
21280        target_system: 0_u8,
21281        target_component: 0_u8,
21282    };
21283    #[cfg(feature = "arbitrary")]
21284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21285        use arbitrary::{Arbitrary, Unstructured};
21286        let mut buf = [0u8; 1024];
21287        rng.fill_bytes(&mut buf);
21288        let mut unstructured = Unstructured::new(&buf);
21289        Self::arbitrary(&mut unstructured).unwrap_or_default()
21290    }
21291}
21292impl Default for MISSION_SET_CURRENT_DATA {
21293    fn default() -> Self {
21294        Self::DEFAULT.clone()
21295    }
21296}
21297impl MessageData for MISSION_SET_CURRENT_DATA {
21298    type Message = MavMessage;
21299    const ID: u32 = 41u32;
21300    const NAME: &'static str = "MISSION_SET_CURRENT";
21301    const EXTRA_CRC: u8 = 28u8;
21302    const ENCODED_LEN: usize = 4usize;
21303    fn deser(
21304        _version: MavlinkVersion,
21305        __input: &[u8],
21306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21307        let avail_len = __input.len();
21308        let mut payload_buf = [0; Self::ENCODED_LEN];
21309        let mut buf = if avail_len < Self::ENCODED_LEN {
21310            payload_buf[0..avail_len].copy_from_slice(__input);
21311            Bytes::new(&payload_buf)
21312        } else {
21313            Bytes::new(__input)
21314        };
21315        let mut __struct = Self::default();
21316        __struct.seq = buf.get_u16_le();
21317        __struct.target_system = buf.get_u8();
21318        __struct.target_component = buf.get_u8();
21319        Ok(__struct)
21320    }
21321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21322        let mut __tmp = BytesMut::new(bytes);
21323        #[allow(clippy::absurd_extreme_comparisons)]
21324        #[allow(unused_comparisons)]
21325        if __tmp.remaining() < Self::ENCODED_LEN {
21326            panic!(
21327                "buffer is too small (need {} bytes, but got {})",
21328                Self::ENCODED_LEN,
21329                __tmp.remaining(),
21330            )
21331        }
21332        __tmp.put_u16_le(self.seq);
21333        __tmp.put_u8(self.target_system);
21334        __tmp.put_u8(self.target_component);
21335        if matches!(version, MavlinkVersion::V2) {
21336            let len = __tmp.len();
21337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21338        } else {
21339            __tmp.len()
21340        }
21341    }
21342}
21343#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21344#[doc = ""]
21345#[doc = "ID: 38"]
21346#[derive(Debug, Clone, PartialEq)]
21347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21349#[cfg_attr(feature = "ts", derive(TS))]
21350#[cfg_attr(feature = "ts", ts(export))]
21351pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21352    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21353    pub start_index: i16,
21354    #[doc = "End index, equal or greater than start index."]
21355    pub end_index: i16,
21356    #[doc = "System ID"]
21357    pub target_system: u8,
21358    #[doc = "Component ID"]
21359    pub target_component: u8,
21360    #[doc = "Mission type."]
21361    #[cfg_attr(feature = "serde", serde(default))]
21362    pub mission_type: MavMissionType,
21363}
21364impl MISSION_WRITE_PARTIAL_LIST_DATA {
21365    pub const ENCODED_LEN: usize = 7usize;
21366    pub const DEFAULT: Self = Self {
21367        start_index: 0_i16,
21368        end_index: 0_i16,
21369        target_system: 0_u8,
21370        target_component: 0_u8,
21371        mission_type: MavMissionType::DEFAULT,
21372    };
21373    #[cfg(feature = "arbitrary")]
21374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21375        use arbitrary::{Arbitrary, Unstructured};
21376        let mut buf = [0u8; 1024];
21377        rng.fill_bytes(&mut buf);
21378        let mut unstructured = Unstructured::new(&buf);
21379        Self::arbitrary(&mut unstructured).unwrap_or_default()
21380    }
21381}
21382impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21383    fn default() -> Self {
21384        Self::DEFAULT.clone()
21385    }
21386}
21387impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21388    type Message = MavMessage;
21389    const ID: u32 = 38u32;
21390    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21391    const EXTRA_CRC: u8 = 9u8;
21392    const ENCODED_LEN: usize = 7usize;
21393    fn deser(
21394        _version: MavlinkVersion,
21395        __input: &[u8],
21396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21397        let avail_len = __input.len();
21398        let mut payload_buf = [0; Self::ENCODED_LEN];
21399        let mut buf = if avail_len < Self::ENCODED_LEN {
21400            payload_buf[0..avail_len].copy_from_slice(__input);
21401            Bytes::new(&payload_buf)
21402        } else {
21403            Bytes::new(__input)
21404        };
21405        let mut __struct = Self::default();
21406        __struct.start_index = buf.get_i16_le();
21407        __struct.end_index = buf.get_i16_le();
21408        __struct.target_system = buf.get_u8();
21409        __struct.target_component = buf.get_u8();
21410        let tmp = buf.get_u8();
21411        __struct.mission_type =
21412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21413                enum_type: "MavMissionType",
21414                value: tmp as u32,
21415            })?;
21416        Ok(__struct)
21417    }
21418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21419        let mut __tmp = BytesMut::new(bytes);
21420        #[allow(clippy::absurd_extreme_comparisons)]
21421        #[allow(unused_comparisons)]
21422        if __tmp.remaining() < Self::ENCODED_LEN {
21423            panic!(
21424                "buffer is too small (need {} bytes, but got {})",
21425                Self::ENCODED_LEN,
21426                __tmp.remaining(),
21427            )
21428        }
21429        __tmp.put_i16_le(self.start_index);
21430        __tmp.put_i16_le(self.end_index);
21431        __tmp.put_u8(self.target_system);
21432        __tmp.put_u8(self.target_component);
21433        if matches!(version, MavlinkVersion::V2) {
21434            __tmp.put_u8(self.mission_type as u8);
21435            let len = __tmp.len();
21436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21437        } else {
21438            __tmp.len()
21439        }
21440    }
21441}
21442#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21443#[doc = "Orientation of a mount."]
21444#[doc = ""]
21445#[doc = "ID: 265"]
21446#[derive(Debug, Clone, PartialEq)]
21447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21449#[cfg_attr(feature = "ts", derive(TS))]
21450#[cfg_attr(feature = "ts", ts(export))]
21451pub struct MOUNT_ORIENTATION_DATA {
21452    #[doc = "Timestamp (time since system boot)."]
21453    pub time_boot_ms: u32,
21454    #[doc = "Roll in global frame (set to NaN for invalid)."]
21455    pub roll: f32,
21456    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21457    pub pitch: f32,
21458    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21459    pub yaw: f32,
21460    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21462    pub yaw_absolute: f32,
21463}
21464impl MOUNT_ORIENTATION_DATA {
21465    pub const ENCODED_LEN: usize = 20usize;
21466    pub const DEFAULT: Self = Self {
21467        time_boot_ms: 0_u32,
21468        roll: 0.0_f32,
21469        pitch: 0.0_f32,
21470        yaw: 0.0_f32,
21471        yaw_absolute: 0.0_f32,
21472    };
21473    #[cfg(feature = "arbitrary")]
21474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21475        use arbitrary::{Arbitrary, Unstructured};
21476        let mut buf = [0u8; 1024];
21477        rng.fill_bytes(&mut buf);
21478        let mut unstructured = Unstructured::new(&buf);
21479        Self::arbitrary(&mut unstructured).unwrap_or_default()
21480    }
21481}
21482impl Default for MOUNT_ORIENTATION_DATA {
21483    fn default() -> Self {
21484        Self::DEFAULT.clone()
21485    }
21486}
21487impl MessageData for MOUNT_ORIENTATION_DATA {
21488    type Message = MavMessage;
21489    const ID: u32 = 265u32;
21490    const NAME: &'static str = "MOUNT_ORIENTATION";
21491    const EXTRA_CRC: u8 = 26u8;
21492    const ENCODED_LEN: usize = 20usize;
21493    fn deser(
21494        _version: MavlinkVersion,
21495        __input: &[u8],
21496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21497        let avail_len = __input.len();
21498        let mut payload_buf = [0; Self::ENCODED_LEN];
21499        let mut buf = if avail_len < Self::ENCODED_LEN {
21500            payload_buf[0..avail_len].copy_from_slice(__input);
21501            Bytes::new(&payload_buf)
21502        } else {
21503            Bytes::new(__input)
21504        };
21505        let mut __struct = Self::default();
21506        __struct.time_boot_ms = buf.get_u32_le();
21507        __struct.roll = buf.get_f32_le();
21508        __struct.pitch = buf.get_f32_le();
21509        __struct.yaw = buf.get_f32_le();
21510        __struct.yaw_absolute = buf.get_f32_le();
21511        Ok(__struct)
21512    }
21513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21514        let mut __tmp = BytesMut::new(bytes);
21515        #[allow(clippy::absurd_extreme_comparisons)]
21516        #[allow(unused_comparisons)]
21517        if __tmp.remaining() < Self::ENCODED_LEN {
21518            panic!(
21519                "buffer is too small (need {} bytes, but got {})",
21520                Self::ENCODED_LEN,
21521                __tmp.remaining(),
21522            )
21523        }
21524        __tmp.put_u32_le(self.time_boot_ms);
21525        __tmp.put_f32_le(self.roll);
21526        __tmp.put_f32_le(self.pitch);
21527        __tmp.put_f32_le(self.yaw);
21528        if matches!(version, MavlinkVersion::V2) {
21529            __tmp.put_f32_le(self.yaw_absolute);
21530            let len = __tmp.len();
21531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21532        } else {
21533            __tmp.len()
21534        }
21535    }
21536}
21537#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21538#[doc = ""]
21539#[doc = "ID: 251"]
21540#[derive(Debug, Clone, PartialEq)]
21541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21543#[cfg_attr(feature = "ts", derive(TS))]
21544#[cfg_attr(feature = "ts", ts(export))]
21545pub struct NAMED_VALUE_FLOAT_DATA {
21546    #[doc = "Timestamp (time since system boot)."]
21547    pub time_boot_ms: u32,
21548    #[doc = "Floating point value"]
21549    pub value: f32,
21550    #[doc = "Name of the debug variable"]
21551    #[cfg_attr(feature = "ts", ts(type = "string"))]
21552    pub name: CharArray<10>,
21553}
21554impl NAMED_VALUE_FLOAT_DATA {
21555    pub const ENCODED_LEN: usize = 18usize;
21556    pub const DEFAULT: Self = Self {
21557        time_boot_ms: 0_u32,
21558        value: 0.0_f32,
21559        name: CharArray::new([0_u8; 10usize]),
21560    };
21561    #[cfg(feature = "arbitrary")]
21562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21563        use arbitrary::{Arbitrary, Unstructured};
21564        let mut buf = [0u8; 1024];
21565        rng.fill_bytes(&mut buf);
21566        let mut unstructured = Unstructured::new(&buf);
21567        Self::arbitrary(&mut unstructured).unwrap_or_default()
21568    }
21569}
21570impl Default for NAMED_VALUE_FLOAT_DATA {
21571    fn default() -> Self {
21572        Self::DEFAULT.clone()
21573    }
21574}
21575impl MessageData for NAMED_VALUE_FLOAT_DATA {
21576    type Message = MavMessage;
21577    const ID: u32 = 251u32;
21578    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21579    const EXTRA_CRC: u8 = 170u8;
21580    const ENCODED_LEN: usize = 18usize;
21581    fn deser(
21582        _version: MavlinkVersion,
21583        __input: &[u8],
21584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21585        let avail_len = __input.len();
21586        let mut payload_buf = [0; Self::ENCODED_LEN];
21587        let mut buf = if avail_len < Self::ENCODED_LEN {
21588            payload_buf[0..avail_len].copy_from_slice(__input);
21589            Bytes::new(&payload_buf)
21590        } else {
21591            Bytes::new(__input)
21592        };
21593        let mut __struct = Self::default();
21594        __struct.time_boot_ms = buf.get_u32_le();
21595        __struct.value = buf.get_f32_le();
21596        let mut tmp = [0_u8; 10usize];
21597        for v in &mut tmp {
21598            *v = buf.get_u8();
21599        }
21600        __struct.name = CharArray::new(tmp);
21601        Ok(__struct)
21602    }
21603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21604        let mut __tmp = BytesMut::new(bytes);
21605        #[allow(clippy::absurd_extreme_comparisons)]
21606        #[allow(unused_comparisons)]
21607        if __tmp.remaining() < Self::ENCODED_LEN {
21608            panic!(
21609                "buffer is too small (need {} bytes, but got {})",
21610                Self::ENCODED_LEN,
21611                __tmp.remaining(),
21612            )
21613        }
21614        __tmp.put_u32_le(self.time_boot_ms);
21615        __tmp.put_f32_le(self.value);
21616        for val in &self.name {
21617            __tmp.put_u8(*val);
21618        }
21619        if matches!(version, MavlinkVersion::V2) {
21620            let len = __tmp.len();
21621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21622        } else {
21623            __tmp.len()
21624        }
21625    }
21626}
21627#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21628#[doc = ""]
21629#[doc = "ID: 252"]
21630#[derive(Debug, Clone, PartialEq)]
21631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21633#[cfg_attr(feature = "ts", derive(TS))]
21634#[cfg_attr(feature = "ts", ts(export))]
21635pub struct NAMED_VALUE_INT_DATA {
21636    #[doc = "Timestamp (time since system boot)."]
21637    pub time_boot_ms: u32,
21638    #[doc = "Signed integer value"]
21639    pub value: i32,
21640    #[doc = "Name of the debug variable"]
21641    #[cfg_attr(feature = "ts", ts(type = "string"))]
21642    pub name: CharArray<10>,
21643}
21644impl NAMED_VALUE_INT_DATA {
21645    pub const ENCODED_LEN: usize = 18usize;
21646    pub const DEFAULT: Self = Self {
21647        time_boot_ms: 0_u32,
21648        value: 0_i32,
21649        name: CharArray::new([0_u8; 10usize]),
21650    };
21651    #[cfg(feature = "arbitrary")]
21652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21653        use arbitrary::{Arbitrary, Unstructured};
21654        let mut buf = [0u8; 1024];
21655        rng.fill_bytes(&mut buf);
21656        let mut unstructured = Unstructured::new(&buf);
21657        Self::arbitrary(&mut unstructured).unwrap_or_default()
21658    }
21659}
21660impl Default for NAMED_VALUE_INT_DATA {
21661    fn default() -> Self {
21662        Self::DEFAULT.clone()
21663    }
21664}
21665impl MessageData for NAMED_VALUE_INT_DATA {
21666    type Message = MavMessage;
21667    const ID: u32 = 252u32;
21668    const NAME: &'static str = "NAMED_VALUE_INT";
21669    const EXTRA_CRC: u8 = 44u8;
21670    const ENCODED_LEN: usize = 18usize;
21671    fn deser(
21672        _version: MavlinkVersion,
21673        __input: &[u8],
21674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21675        let avail_len = __input.len();
21676        let mut payload_buf = [0; Self::ENCODED_LEN];
21677        let mut buf = if avail_len < Self::ENCODED_LEN {
21678            payload_buf[0..avail_len].copy_from_slice(__input);
21679            Bytes::new(&payload_buf)
21680        } else {
21681            Bytes::new(__input)
21682        };
21683        let mut __struct = Self::default();
21684        __struct.time_boot_ms = buf.get_u32_le();
21685        __struct.value = buf.get_i32_le();
21686        let mut tmp = [0_u8; 10usize];
21687        for v in &mut tmp {
21688            *v = buf.get_u8();
21689        }
21690        __struct.name = CharArray::new(tmp);
21691        Ok(__struct)
21692    }
21693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21694        let mut __tmp = BytesMut::new(bytes);
21695        #[allow(clippy::absurd_extreme_comparisons)]
21696        #[allow(unused_comparisons)]
21697        if __tmp.remaining() < Self::ENCODED_LEN {
21698            panic!(
21699                "buffer is too small (need {} bytes, but got {})",
21700                Self::ENCODED_LEN,
21701                __tmp.remaining(),
21702            )
21703        }
21704        __tmp.put_u32_le(self.time_boot_ms);
21705        __tmp.put_i32_le(self.value);
21706        for val in &self.name {
21707            __tmp.put_u8(*val);
21708        }
21709        if matches!(version, MavlinkVersion::V2) {
21710            let len = __tmp.len();
21711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21712        } else {
21713            __tmp.len()
21714        }
21715    }
21716}
21717#[doc = "The state of the navigation and position controller."]
21718#[doc = ""]
21719#[doc = "ID: 62"]
21720#[derive(Debug, Clone, PartialEq)]
21721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21723#[cfg_attr(feature = "ts", derive(TS))]
21724#[cfg_attr(feature = "ts", ts(export))]
21725pub struct NAV_CONTROLLER_OUTPUT_DATA {
21726    #[doc = "Current desired roll"]
21727    pub nav_roll: f32,
21728    #[doc = "Current desired pitch"]
21729    pub nav_pitch: f32,
21730    #[doc = "Current altitude error"]
21731    pub alt_error: f32,
21732    #[doc = "Current airspeed error"]
21733    pub aspd_error: f32,
21734    #[doc = "Current crosstrack error on x-y plane"]
21735    pub xtrack_error: f32,
21736    #[doc = "Current desired heading"]
21737    pub nav_bearing: i16,
21738    #[doc = "Bearing to current waypoint/target"]
21739    pub target_bearing: i16,
21740    #[doc = "Distance to active waypoint"]
21741    pub wp_dist: u16,
21742}
21743impl NAV_CONTROLLER_OUTPUT_DATA {
21744    pub const ENCODED_LEN: usize = 26usize;
21745    pub const DEFAULT: Self = Self {
21746        nav_roll: 0.0_f32,
21747        nav_pitch: 0.0_f32,
21748        alt_error: 0.0_f32,
21749        aspd_error: 0.0_f32,
21750        xtrack_error: 0.0_f32,
21751        nav_bearing: 0_i16,
21752        target_bearing: 0_i16,
21753        wp_dist: 0_u16,
21754    };
21755    #[cfg(feature = "arbitrary")]
21756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21757        use arbitrary::{Arbitrary, Unstructured};
21758        let mut buf = [0u8; 1024];
21759        rng.fill_bytes(&mut buf);
21760        let mut unstructured = Unstructured::new(&buf);
21761        Self::arbitrary(&mut unstructured).unwrap_or_default()
21762    }
21763}
21764impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21765    fn default() -> Self {
21766        Self::DEFAULT.clone()
21767    }
21768}
21769impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21770    type Message = MavMessage;
21771    const ID: u32 = 62u32;
21772    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21773    const EXTRA_CRC: u8 = 183u8;
21774    const ENCODED_LEN: usize = 26usize;
21775    fn deser(
21776        _version: MavlinkVersion,
21777        __input: &[u8],
21778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21779        let avail_len = __input.len();
21780        let mut payload_buf = [0; Self::ENCODED_LEN];
21781        let mut buf = if avail_len < Self::ENCODED_LEN {
21782            payload_buf[0..avail_len].copy_from_slice(__input);
21783            Bytes::new(&payload_buf)
21784        } else {
21785            Bytes::new(__input)
21786        };
21787        let mut __struct = Self::default();
21788        __struct.nav_roll = buf.get_f32_le();
21789        __struct.nav_pitch = buf.get_f32_le();
21790        __struct.alt_error = buf.get_f32_le();
21791        __struct.aspd_error = buf.get_f32_le();
21792        __struct.xtrack_error = buf.get_f32_le();
21793        __struct.nav_bearing = buf.get_i16_le();
21794        __struct.target_bearing = buf.get_i16_le();
21795        __struct.wp_dist = buf.get_u16_le();
21796        Ok(__struct)
21797    }
21798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21799        let mut __tmp = BytesMut::new(bytes);
21800        #[allow(clippy::absurd_extreme_comparisons)]
21801        #[allow(unused_comparisons)]
21802        if __tmp.remaining() < Self::ENCODED_LEN {
21803            panic!(
21804                "buffer is too small (need {} bytes, but got {})",
21805                Self::ENCODED_LEN,
21806                __tmp.remaining(),
21807            )
21808        }
21809        __tmp.put_f32_le(self.nav_roll);
21810        __tmp.put_f32_le(self.nav_pitch);
21811        __tmp.put_f32_le(self.alt_error);
21812        __tmp.put_f32_le(self.aspd_error);
21813        __tmp.put_f32_le(self.xtrack_error);
21814        __tmp.put_i16_le(self.nav_bearing);
21815        __tmp.put_i16_le(self.target_bearing);
21816        __tmp.put_u16_le(self.wp_dist);
21817        if matches!(version, MavlinkVersion::V2) {
21818            let len = __tmp.len();
21819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21820        } else {
21821            __tmp.len()
21822        }
21823    }
21824}
21825#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21826#[doc = ""]
21827#[doc = "ID: 330"]
21828#[derive(Debug, Clone, PartialEq)]
21829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21831#[cfg_attr(feature = "ts", derive(TS))]
21832#[cfg_attr(feature = "ts", ts(export))]
21833pub struct OBSTACLE_DISTANCE_DATA {
21834    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21835    pub time_usec: u64,
21836    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21837    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21838    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21839    pub distances: [u16; 72],
21840    #[doc = "Minimum distance the sensor can measure."]
21841    pub min_distance: u16,
21842    #[doc = "Maximum distance the sensor can measure."]
21843    pub max_distance: u16,
21844    #[doc = "Class id of the distance sensor type."]
21845    pub sensor_type: MavDistanceSensor,
21846    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21847    pub increment: u8,
21848    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21849    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21850    pub increment_f: f32,
21851    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21853    pub angle_offset: f32,
21854    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21855    #[cfg_attr(feature = "serde", serde(default))]
21856    pub frame: MavFrame,
21857}
21858impl OBSTACLE_DISTANCE_DATA {
21859    pub const ENCODED_LEN: usize = 167usize;
21860    pub const DEFAULT: Self = Self {
21861        time_usec: 0_u64,
21862        distances: [0_u16; 72usize],
21863        min_distance: 0_u16,
21864        max_distance: 0_u16,
21865        sensor_type: MavDistanceSensor::DEFAULT,
21866        increment: 0_u8,
21867        increment_f: 0.0_f32,
21868        angle_offset: 0.0_f32,
21869        frame: MavFrame::DEFAULT,
21870    };
21871    #[cfg(feature = "arbitrary")]
21872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21873        use arbitrary::{Arbitrary, Unstructured};
21874        let mut buf = [0u8; 1024];
21875        rng.fill_bytes(&mut buf);
21876        let mut unstructured = Unstructured::new(&buf);
21877        Self::arbitrary(&mut unstructured).unwrap_or_default()
21878    }
21879}
21880impl Default for OBSTACLE_DISTANCE_DATA {
21881    fn default() -> Self {
21882        Self::DEFAULT.clone()
21883    }
21884}
21885impl MessageData for OBSTACLE_DISTANCE_DATA {
21886    type Message = MavMessage;
21887    const ID: u32 = 330u32;
21888    const NAME: &'static str = "OBSTACLE_DISTANCE";
21889    const EXTRA_CRC: u8 = 23u8;
21890    const ENCODED_LEN: usize = 167usize;
21891    fn deser(
21892        _version: MavlinkVersion,
21893        __input: &[u8],
21894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21895        let avail_len = __input.len();
21896        let mut payload_buf = [0; Self::ENCODED_LEN];
21897        let mut buf = if avail_len < Self::ENCODED_LEN {
21898            payload_buf[0..avail_len].copy_from_slice(__input);
21899            Bytes::new(&payload_buf)
21900        } else {
21901            Bytes::new(__input)
21902        };
21903        let mut __struct = Self::default();
21904        __struct.time_usec = buf.get_u64_le();
21905        for v in &mut __struct.distances {
21906            let val = buf.get_u16_le();
21907            *v = val;
21908        }
21909        __struct.min_distance = buf.get_u16_le();
21910        __struct.max_distance = buf.get_u16_le();
21911        let tmp = buf.get_u8();
21912        __struct.sensor_type =
21913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21914                enum_type: "MavDistanceSensor",
21915                value: tmp as u32,
21916            })?;
21917        __struct.increment = buf.get_u8();
21918        __struct.increment_f = buf.get_f32_le();
21919        __struct.angle_offset = buf.get_f32_le();
21920        let tmp = buf.get_u8();
21921        __struct.frame =
21922            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21923                enum_type: "MavFrame",
21924                value: tmp as u32,
21925            })?;
21926        Ok(__struct)
21927    }
21928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21929        let mut __tmp = BytesMut::new(bytes);
21930        #[allow(clippy::absurd_extreme_comparisons)]
21931        #[allow(unused_comparisons)]
21932        if __tmp.remaining() < Self::ENCODED_LEN {
21933            panic!(
21934                "buffer is too small (need {} bytes, but got {})",
21935                Self::ENCODED_LEN,
21936                __tmp.remaining(),
21937            )
21938        }
21939        __tmp.put_u64_le(self.time_usec);
21940        for val in &self.distances {
21941            __tmp.put_u16_le(*val);
21942        }
21943        __tmp.put_u16_le(self.min_distance);
21944        __tmp.put_u16_le(self.max_distance);
21945        __tmp.put_u8(self.sensor_type as u8);
21946        __tmp.put_u8(self.increment);
21947        if matches!(version, MavlinkVersion::V2) {
21948            __tmp.put_f32_le(self.increment_f);
21949            __tmp.put_f32_le(self.angle_offset);
21950            __tmp.put_u8(self.frame as u8);
21951            let len = __tmp.len();
21952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21953        } else {
21954            __tmp.len()
21955        }
21956    }
21957}
21958#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21959#[doc = ""]
21960#[doc = "ID: 331"]
21961#[derive(Debug, Clone, PartialEq)]
21962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21964#[cfg_attr(feature = "ts", derive(TS))]
21965#[cfg_attr(feature = "ts", ts(export))]
21966pub struct ODOMETRY_DATA {
21967    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21968    pub time_usec: u64,
21969    #[doc = "X Position"]
21970    pub x: f32,
21971    #[doc = "Y Position"]
21972    pub y: f32,
21973    #[doc = "Z Position"]
21974    pub z: f32,
21975    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21976    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21977    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21978    pub q: [f32; 4],
21979    #[doc = "X linear speed"]
21980    pub vx: f32,
21981    #[doc = "Y linear speed"]
21982    pub vy: f32,
21983    #[doc = "Z linear speed"]
21984    pub vz: f32,
21985    #[doc = "Roll angular speed"]
21986    pub rollspeed: f32,
21987    #[doc = "Pitch angular speed"]
21988    pub pitchspeed: f32,
21989    #[doc = "Yaw angular speed"]
21990    pub yawspeed: f32,
21991    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21994    pub pose_covariance: [f32; 21],
21995    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21996    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21997    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21998    pub velocity_covariance: [f32; 21],
21999    #[doc = "Coordinate frame of reference for the pose data."]
22000    pub frame_id: MavFrame,
22001    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22002    pub child_frame_id: MavFrame,
22003    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22005    pub reset_counter: u8,
22006    #[doc = "Type of estimator that is providing the odometry."]
22007    #[cfg_attr(feature = "serde", serde(default))]
22008    pub estimator_type: MavEstimatorType,
22009    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22010    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22011    pub quality: i8,
22012}
22013impl ODOMETRY_DATA {
22014    pub const ENCODED_LEN: usize = 233usize;
22015    pub const DEFAULT: Self = Self {
22016        time_usec: 0_u64,
22017        x: 0.0_f32,
22018        y: 0.0_f32,
22019        z: 0.0_f32,
22020        q: [0.0_f32; 4usize],
22021        vx: 0.0_f32,
22022        vy: 0.0_f32,
22023        vz: 0.0_f32,
22024        rollspeed: 0.0_f32,
22025        pitchspeed: 0.0_f32,
22026        yawspeed: 0.0_f32,
22027        pose_covariance: [0.0_f32; 21usize],
22028        velocity_covariance: [0.0_f32; 21usize],
22029        frame_id: MavFrame::DEFAULT,
22030        child_frame_id: MavFrame::DEFAULT,
22031        reset_counter: 0_u8,
22032        estimator_type: MavEstimatorType::DEFAULT,
22033        quality: 0_i8,
22034    };
22035    #[cfg(feature = "arbitrary")]
22036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22037        use arbitrary::{Arbitrary, Unstructured};
22038        let mut buf = [0u8; 1024];
22039        rng.fill_bytes(&mut buf);
22040        let mut unstructured = Unstructured::new(&buf);
22041        Self::arbitrary(&mut unstructured).unwrap_or_default()
22042    }
22043}
22044impl Default for ODOMETRY_DATA {
22045    fn default() -> Self {
22046        Self::DEFAULT.clone()
22047    }
22048}
22049impl MessageData for ODOMETRY_DATA {
22050    type Message = MavMessage;
22051    const ID: u32 = 331u32;
22052    const NAME: &'static str = "ODOMETRY";
22053    const EXTRA_CRC: u8 = 91u8;
22054    const ENCODED_LEN: usize = 233usize;
22055    fn deser(
22056        _version: MavlinkVersion,
22057        __input: &[u8],
22058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22059        let avail_len = __input.len();
22060        let mut payload_buf = [0; Self::ENCODED_LEN];
22061        let mut buf = if avail_len < Self::ENCODED_LEN {
22062            payload_buf[0..avail_len].copy_from_slice(__input);
22063            Bytes::new(&payload_buf)
22064        } else {
22065            Bytes::new(__input)
22066        };
22067        let mut __struct = Self::default();
22068        __struct.time_usec = buf.get_u64_le();
22069        __struct.x = buf.get_f32_le();
22070        __struct.y = buf.get_f32_le();
22071        __struct.z = buf.get_f32_le();
22072        for v in &mut __struct.q {
22073            let val = buf.get_f32_le();
22074            *v = val;
22075        }
22076        __struct.vx = buf.get_f32_le();
22077        __struct.vy = buf.get_f32_le();
22078        __struct.vz = buf.get_f32_le();
22079        __struct.rollspeed = buf.get_f32_le();
22080        __struct.pitchspeed = buf.get_f32_le();
22081        __struct.yawspeed = buf.get_f32_le();
22082        for v in &mut __struct.pose_covariance {
22083            let val = buf.get_f32_le();
22084            *v = val;
22085        }
22086        for v in &mut __struct.velocity_covariance {
22087            let val = buf.get_f32_le();
22088            *v = val;
22089        }
22090        let tmp = buf.get_u8();
22091        __struct.frame_id =
22092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22093                enum_type: "MavFrame",
22094                value: tmp as u32,
22095            })?;
22096        let tmp = buf.get_u8();
22097        __struct.child_frame_id =
22098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22099                enum_type: "MavFrame",
22100                value: tmp as u32,
22101            })?;
22102        __struct.reset_counter = buf.get_u8();
22103        let tmp = buf.get_u8();
22104        __struct.estimator_type =
22105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22106                enum_type: "MavEstimatorType",
22107                value: tmp as u32,
22108            })?;
22109        __struct.quality = buf.get_i8();
22110        Ok(__struct)
22111    }
22112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22113        let mut __tmp = BytesMut::new(bytes);
22114        #[allow(clippy::absurd_extreme_comparisons)]
22115        #[allow(unused_comparisons)]
22116        if __tmp.remaining() < Self::ENCODED_LEN {
22117            panic!(
22118                "buffer is too small (need {} bytes, but got {})",
22119                Self::ENCODED_LEN,
22120                __tmp.remaining(),
22121            )
22122        }
22123        __tmp.put_u64_le(self.time_usec);
22124        __tmp.put_f32_le(self.x);
22125        __tmp.put_f32_le(self.y);
22126        __tmp.put_f32_le(self.z);
22127        for val in &self.q {
22128            __tmp.put_f32_le(*val);
22129        }
22130        __tmp.put_f32_le(self.vx);
22131        __tmp.put_f32_le(self.vy);
22132        __tmp.put_f32_le(self.vz);
22133        __tmp.put_f32_le(self.rollspeed);
22134        __tmp.put_f32_le(self.pitchspeed);
22135        __tmp.put_f32_le(self.yawspeed);
22136        for val in &self.pose_covariance {
22137            __tmp.put_f32_le(*val);
22138        }
22139        for val in &self.velocity_covariance {
22140            __tmp.put_f32_le(*val);
22141        }
22142        __tmp.put_u8(self.frame_id as u8);
22143        __tmp.put_u8(self.child_frame_id as u8);
22144        if matches!(version, MavlinkVersion::V2) {
22145            __tmp.put_u8(self.reset_counter);
22146            __tmp.put_u8(self.estimator_type as u8);
22147            __tmp.put_i8(self.quality);
22148            let len = __tmp.len();
22149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22150        } else {
22151            __tmp.len()
22152        }
22153    }
22154}
22155#[doc = "Hardware status sent by an onboard computer."]
22156#[doc = ""]
22157#[doc = "ID: 390"]
22158#[derive(Debug, Clone, PartialEq)]
22159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22161#[cfg_attr(feature = "ts", derive(TS))]
22162#[cfg_attr(feature = "ts", ts(export))]
22163pub struct ONBOARD_COMPUTER_STATUS_DATA {
22164    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22165    pub time_usec: u64,
22166    #[doc = "Time since system boot."]
22167    pub uptime: u32,
22168    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22169    pub ram_usage: u32,
22170    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22171    pub ram_total: u32,
22172    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22175    pub storage_type: [u32; 4],
22176    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22179    pub storage_usage: [u32; 4],
22180    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22183    pub storage_total: [u32; 4],
22184    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22186    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22187    pub link_type: [u32; 6],
22188    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22190    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22191    pub link_tx_rate: [u32; 6],
22192    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22194    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22195    pub link_rx_rate: [u32; 6],
22196    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22198    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22199    pub link_tx_max: [u32; 6],
22200    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22201    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22202    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22203    pub link_rx_max: [u32; 6],
22204    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22207    pub fan_speed: [i16; 4],
22208    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22209    pub mavtype: u8,
22210    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22212    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22213    pub cpu_cores: [u8; 8],
22214    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22217    pub cpu_combined: [u8; 10],
22218    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22220    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22221    pub gpu_cores: [u8; 4],
22222    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22225    pub gpu_combined: [u8; 10],
22226    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22227    pub temperature_board: i8,
22228    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22231    pub temperature_core: [i8; 8],
22232}
22233impl ONBOARD_COMPUTER_STATUS_DATA {
22234    pub const ENCODED_LEN: usize = 238usize;
22235    pub const DEFAULT: Self = Self {
22236        time_usec: 0_u64,
22237        uptime: 0_u32,
22238        ram_usage: 0_u32,
22239        ram_total: 0_u32,
22240        storage_type: [0_u32; 4usize],
22241        storage_usage: [0_u32; 4usize],
22242        storage_total: [0_u32; 4usize],
22243        link_type: [0_u32; 6usize],
22244        link_tx_rate: [0_u32; 6usize],
22245        link_rx_rate: [0_u32; 6usize],
22246        link_tx_max: [0_u32; 6usize],
22247        link_rx_max: [0_u32; 6usize],
22248        fan_speed: [0_i16; 4usize],
22249        mavtype: 0_u8,
22250        cpu_cores: [0_u8; 8usize],
22251        cpu_combined: [0_u8; 10usize],
22252        gpu_cores: [0_u8; 4usize],
22253        gpu_combined: [0_u8; 10usize],
22254        temperature_board: 0_i8,
22255        temperature_core: [0_i8; 8usize],
22256    };
22257    #[cfg(feature = "arbitrary")]
22258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22259        use arbitrary::{Arbitrary, Unstructured};
22260        let mut buf = [0u8; 1024];
22261        rng.fill_bytes(&mut buf);
22262        let mut unstructured = Unstructured::new(&buf);
22263        Self::arbitrary(&mut unstructured).unwrap_or_default()
22264    }
22265}
22266impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22267    fn default() -> Self {
22268        Self::DEFAULT.clone()
22269    }
22270}
22271impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22272    type Message = MavMessage;
22273    const ID: u32 = 390u32;
22274    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22275    const EXTRA_CRC: u8 = 156u8;
22276    const ENCODED_LEN: usize = 238usize;
22277    fn deser(
22278        _version: MavlinkVersion,
22279        __input: &[u8],
22280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22281        let avail_len = __input.len();
22282        let mut payload_buf = [0; Self::ENCODED_LEN];
22283        let mut buf = if avail_len < Self::ENCODED_LEN {
22284            payload_buf[0..avail_len].copy_from_slice(__input);
22285            Bytes::new(&payload_buf)
22286        } else {
22287            Bytes::new(__input)
22288        };
22289        let mut __struct = Self::default();
22290        __struct.time_usec = buf.get_u64_le();
22291        __struct.uptime = buf.get_u32_le();
22292        __struct.ram_usage = buf.get_u32_le();
22293        __struct.ram_total = buf.get_u32_le();
22294        for v in &mut __struct.storage_type {
22295            let val = buf.get_u32_le();
22296            *v = val;
22297        }
22298        for v in &mut __struct.storage_usage {
22299            let val = buf.get_u32_le();
22300            *v = val;
22301        }
22302        for v in &mut __struct.storage_total {
22303            let val = buf.get_u32_le();
22304            *v = val;
22305        }
22306        for v in &mut __struct.link_type {
22307            let val = buf.get_u32_le();
22308            *v = val;
22309        }
22310        for v in &mut __struct.link_tx_rate {
22311            let val = buf.get_u32_le();
22312            *v = val;
22313        }
22314        for v in &mut __struct.link_rx_rate {
22315            let val = buf.get_u32_le();
22316            *v = val;
22317        }
22318        for v in &mut __struct.link_tx_max {
22319            let val = buf.get_u32_le();
22320            *v = val;
22321        }
22322        for v in &mut __struct.link_rx_max {
22323            let val = buf.get_u32_le();
22324            *v = val;
22325        }
22326        for v in &mut __struct.fan_speed {
22327            let val = buf.get_i16_le();
22328            *v = val;
22329        }
22330        __struct.mavtype = buf.get_u8();
22331        for v in &mut __struct.cpu_cores {
22332            let val = buf.get_u8();
22333            *v = val;
22334        }
22335        for v in &mut __struct.cpu_combined {
22336            let val = buf.get_u8();
22337            *v = val;
22338        }
22339        for v in &mut __struct.gpu_cores {
22340            let val = buf.get_u8();
22341            *v = val;
22342        }
22343        for v in &mut __struct.gpu_combined {
22344            let val = buf.get_u8();
22345            *v = val;
22346        }
22347        __struct.temperature_board = buf.get_i8();
22348        for v in &mut __struct.temperature_core {
22349            let val = buf.get_i8();
22350            *v = val;
22351        }
22352        Ok(__struct)
22353    }
22354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22355        let mut __tmp = BytesMut::new(bytes);
22356        #[allow(clippy::absurd_extreme_comparisons)]
22357        #[allow(unused_comparisons)]
22358        if __tmp.remaining() < Self::ENCODED_LEN {
22359            panic!(
22360                "buffer is too small (need {} bytes, but got {})",
22361                Self::ENCODED_LEN,
22362                __tmp.remaining(),
22363            )
22364        }
22365        __tmp.put_u64_le(self.time_usec);
22366        __tmp.put_u32_le(self.uptime);
22367        __tmp.put_u32_le(self.ram_usage);
22368        __tmp.put_u32_le(self.ram_total);
22369        for val in &self.storage_type {
22370            __tmp.put_u32_le(*val);
22371        }
22372        for val in &self.storage_usage {
22373            __tmp.put_u32_le(*val);
22374        }
22375        for val in &self.storage_total {
22376            __tmp.put_u32_le(*val);
22377        }
22378        for val in &self.link_type {
22379            __tmp.put_u32_le(*val);
22380        }
22381        for val in &self.link_tx_rate {
22382            __tmp.put_u32_le(*val);
22383        }
22384        for val in &self.link_rx_rate {
22385            __tmp.put_u32_le(*val);
22386        }
22387        for val in &self.link_tx_max {
22388            __tmp.put_u32_le(*val);
22389        }
22390        for val in &self.link_rx_max {
22391            __tmp.put_u32_le(*val);
22392        }
22393        for val in &self.fan_speed {
22394            __tmp.put_i16_le(*val);
22395        }
22396        __tmp.put_u8(self.mavtype);
22397        for val in &self.cpu_cores {
22398            __tmp.put_u8(*val);
22399        }
22400        for val in &self.cpu_combined {
22401            __tmp.put_u8(*val);
22402        }
22403        for val in &self.gpu_cores {
22404            __tmp.put_u8(*val);
22405        }
22406        for val in &self.gpu_combined {
22407            __tmp.put_u8(*val);
22408        }
22409        __tmp.put_i8(self.temperature_board);
22410        for val in &self.temperature_core {
22411            __tmp.put_i8(*val);
22412        }
22413        if matches!(version, MavlinkVersion::V2) {
22414            let len = __tmp.len();
22415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22416        } else {
22417            __tmp.len()
22418        }
22419    }
22420}
22421#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22422#[doc = ""]
22423#[doc = "ID: 12918"]
22424#[derive(Debug, Clone, PartialEq)]
22425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22427#[cfg_attr(feature = "ts", derive(TS))]
22428#[cfg_attr(feature = "ts", ts(export))]
22429pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22430    #[doc = "Status level indicating if arming is allowed."]
22431    pub status: MavOdidArmStatus,
22432    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22433    #[cfg_attr(feature = "ts", ts(type = "string"))]
22434    pub error: CharArray<50>,
22435}
22436impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22437    pub const ENCODED_LEN: usize = 51usize;
22438    pub const DEFAULT: Self = Self {
22439        status: MavOdidArmStatus::DEFAULT,
22440        error: CharArray::new([0_u8; 50usize]),
22441    };
22442    #[cfg(feature = "arbitrary")]
22443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22444        use arbitrary::{Arbitrary, Unstructured};
22445        let mut buf = [0u8; 1024];
22446        rng.fill_bytes(&mut buf);
22447        let mut unstructured = Unstructured::new(&buf);
22448        Self::arbitrary(&mut unstructured).unwrap_or_default()
22449    }
22450}
22451impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22452    fn default() -> Self {
22453        Self::DEFAULT.clone()
22454    }
22455}
22456impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22457    type Message = MavMessage;
22458    const ID: u32 = 12918u32;
22459    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22460    const EXTRA_CRC: u8 = 139u8;
22461    const ENCODED_LEN: usize = 51usize;
22462    fn deser(
22463        _version: MavlinkVersion,
22464        __input: &[u8],
22465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22466        let avail_len = __input.len();
22467        let mut payload_buf = [0; Self::ENCODED_LEN];
22468        let mut buf = if avail_len < Self::ENCODED_LEN {
22469            payload_buf[0..avail_len].copy_from_slice(__input);
22470            Bytes::new(&payload_buf)
22471        } else {
22472            Bytes::new(__input)
22473        };
22474        let mut __struct = Self::default();
22475        let tmp = buf.get_u8();
22476        __struct.status =
22477            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22478                enum_type: "MavOdidArmStatus",
22479                value: tmp as u32,
22480            })?;
22481        let mut tmp = [0_u8; 50usize];
22482        for v in &mut tmp {
22483            *v = buf.get_u8();
22484        }
22485        __struct.error = CharArray::new(tmp);
22486        Ok(__struct)
22487    }
22488    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22489        let mut __tmp = BytesMut::new(bytes);
22490        #[allow(clippy::absurd_extreme_comparisons)]
22491        #[allow(unused_comparisons)]
22492        if __tmp.remaining() < Self::ENCODED_LEN {
22493            panic!(
22494                "buffer is too small (need {} bytes, but got {})",
22495                Self::ENCODED_LEN,
22496                __tmp.remaining(),
22497            )
22498        }
22499        __tmp.put_u8(self.status as u8);
22500        for val in &self.error {
22501            __tmp.put_u8(*val);
22502        }
22503        if matches!(version, MavlinkVersion::V2) {
22504            let len = __tmp.len();
22505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22506        } else {
22507            __tmp.len()
22508        }
22509    }
22510}
22511#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22512#[doc = ""]
22513#[doc = "ID: 12902"]
22514#[derive(Debug, Clone, PartialEq)]
22515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22517#[cfg_attr(feature = "ts", derive(TS))]
22518#[cfg_attr(feature = "ts", ts(export))]
22519pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22520    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22521    pub timestamp: u32,
22522    #[doc = "System ID (0 for broadcast)."]
22523    pub target_system: u8,
22524    #[doc = "Component ID (0 for broadcast)."]
22525    pub target_component: u8,
22526    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22528    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22529    pub id_or_mac: [u8; 20],
22530    #[doc = "Indicates the type of authentication."]
22531    pub authentication_type: MavOdidAuthType,
22532    #[doc = "Allowed range is 0 - 15."]
22533    pub data_page: u8,
22534    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22535    pub last_page_index: u8,
22536    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22537    pub length: u8,
22538    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22539    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22540    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22541    pub authentication_data: [u8; 23],
22542}
22543impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22544    pub const ENCODED_LEN: usize = 53usize;
22545    pub const DEFAULT: Self = Self {
22546        timestamp: 0_u32,
22547        target_system: 0_u8,
22548        target_component: 0_u8,
22549        id_or_mac: [0_u8; 20usize],
22550        authentication_type: MavOdidAuthType::DEFAULT,
22551        data_page: 0_u8,
22552        last_page_index: 0_u8,
22553        length: 0_u8,
22554        authentication_data: [0_u8; 23usize],
22555    };
22556    #[cfg(feature = "arbitrary")]
22557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22558        use arbitrary::{Arbitrary, Unstructured};
22559        let mut buf = [0u8; 1024];
22560        rng.fill_bytes(&mut buf);
22561        let mut unstructured = Unstructured::new(&buf);
22562        Self::arbitrary(&mut unstructured).unwrap_or_default()
22563    }
22564}
22565impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22566    fn default() -> Self {
22567        Self::DEFAULT.clone()
22568    }
22569}
22570impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22571    type Message = MavMessage;
22572    const ID: u32 = 12902u32;
22573    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22574    const EXTRA_CRC: u8 = 140u8;
22575    const ENCODED_LEN: usize = 53usize;
22576    fn deser(
22577        _version: MavlinkVersion,
22578        __input: &[u8],
22579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22580        let avail_len = __input.len();
22581        let mut payload_buf = [0; Self::ENCODED_LEN];
22582        let mut buf = if avail_len < Self::ENCODED_LEN {
22583            payload_buf[0..avail_len].copy_from_slice(__input);
22584            Bytes::new(&payload_buf)
22585        } else {
22586            Bytes::new(__input)
22587        };
22588        let mut __struct = Self::default();
22589        __struct.timestamp = buf.get_u32_le();
22590        __struct.target_system = buf.get_u8();
22591        __struct.target_component = buf.get_u8();
22592        for v in &mut __struct.id_or_mac {
22593            let val = buf.get_u8();
22594            *v = val;
22595        }
22596        let tmp = buf.get_u8();
22597        __struct.authentication_type =
22598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22599                enum_type: "MavOdidAuthType",
22600                value: tmp as u32,
22601            })?;
22602        __struct.data_page = buf.get_u8();
22603        __struct.last_page_index = buf.get_u8();
22604        __struct.length = buf.get_u8();
22605        for v in &mut __struct.authentication_data {
22606            let val = buf.get_u8();
22607            *v = val;
22608        }
22609        Ok(__struct)
22610    }
22611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22612        let mut __tmp = BytesMut::new(bytes);
22613        #[allow(clippy::absurd_extreme_comparisons)]
22614        #[allow(unused_comparisons)]
22615        if __tmp.remaining() < Self::ENCODED_LEN {
22616            panic!(
22617                "buffer is too small (need {} bytes, but got {})",
22618                Self::ENCODED_LEN,
22619                __tmp.remaining(),
22620            )
22621        }
22622        __tmp.put_u32_le(self.timestamp);
22623        __tmp.put_u8(self.target_system);
22624        __tmp.put_u8(self.target_component);
22625        for val in &self.id_or_mac {
22626            __tmp.put_u8(*val);
22627        }
22628        __tmp.put_u8(self.authentication_type as u8);
22629        __tmp.put_u8(self.data_page);
22630        __tmp.put_u8(self.last_page_index);
22631        __tmp.put_u8(self.length);
22632        for val in &self.authentication_data {
22633            __tmp.put_u8(*val);
22634        }
22635        if matches!(version, MavlinkVersion::V2) {
22636            let len = __tmp.len();
22637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22638        } else {
22639            __tmp.len()
22640        }
22641    }
22642}
22643#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22644#[doc = ""]
22645#[doc = "ID: 12900"]
22646#[derive(Debug, Clone, PartialEq)]
22647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22649#[cfg_attr(feature = "ts", derive(TS))]
22650#[cfg_attr(feature = "ts", ts(export))]
22651pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22652    #[doc = "System ID (0 for broadcast)."]
22653    pub target_system: u8,
22654    #[doc = "Component ID (0 for broadcast)."]
22655    pub target_component: u8,
22656    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22658    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22659    pub id_or_mac: [u8; 20],
22660    #[doc = "Indicates the format for the uas_id field of this message."]
22661    pub id_type: MavOdidIdType,
22662    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22663    pub ua_type: MavOdidUaType,
22664    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22666    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22667    pub uas_id: [u8; 20],
22668}
22669impl OPEN_DRONE_ID_BASIC_ID_DATA {
22670    pub const ENCODED_LEN: usize = 44usize;
22671    pub const DEFAULT: Self = Self {
22672        target_system: 0_u8,
22673        target_component: 0_u8,
22674        id_or_mac: [0_u8; 20usize],
22675        id_type: MavOdidIdType::DEFAULT,
22676        ua_type: MavOdidUaType::DEFAULT,
22677        uas_id: [0_u8; 20usize],
22678    };
22679    #[cfg(feature = "arbitrary")]
22680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22681        use arbitrary::{Arbitrary, Unstructured};
22682        let mut buf = [0u8; 1024];
22683        rng.fill_bytes(&mut buf);
22684        let mut unstructured = Unstructured::new(&buf);
22685        Self::arbitrary(&mut unstructured).unwrap_or_default()
22686    }
22687}
22688impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22689    fn default() -> Self {
22690        Self::DEFAULT.clone()
22691    }
22692}
22693impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22694    type Message = MavMessage;
22695    const ID: u32 = 12900u32;
22696    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22697    const EXTRA_CRC: u8 = 114u8;
22698    const ENCODED_LEN: usize = 44usize;
22699    fn deser(
22700        _version: MavlinkVersion,
22701        __input: &[u8],
22702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22703        let avail_len = __input.len();
22704        let mut payload_buf = [0; Self::ENCODED_LEN];
22705        let mut buf = if avail_len < Self::ENCODED_LEN {
22706            payload_buf[0..avail_len].copy_from_slice(__input);
22707            Bytes::new(&payload_buf)
22708        } else {
22709            Bytes::new(__input)
22710        };
22711        let mut __struct = Self::default();
22712        __struct.target_system = buf.get_u8();
22713        __struct.target_component = buf.get_u8();
22714        for v in &mut __struct.id_or_mac {
22715            let val = buf.get_u8();
22716            *v = val;
22717        }
22718        let tmp = buf.get_u8();
22719        __struct.id_type =
22720            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22721                enum_type: "MavOdidIdType",
22722                value: tmp as u32,
22723            })?;
22724        let tmp = buf.get_u8();
22725        __struct.ua_type =
22726            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22727                enum_type: "MavOdidUaType",
22728                value: tmp as u32,
22729            })?;
22730        for v in &mut __struct.uas_id {
22731            let val = buf.get_u8();
22732            *v = val;
22733        }
22734        Ok(__struct)
22735    }
22736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22737        let mut __tmp = BytesMut::new(bytes);
22738        #[allow(clippy::absurd_extreme_comparisons)]
22739        #[allow(unused_comparisons)]
22740        if __tmp.remaining() < Self::ENCODED_LEN {
22741            panic!(
22742                "buffer is too small (need {} bytes, but got {})",
22743                Self::ENCODED_LEN,
22744                __tmp.remaining(),
22745            )
22746        }
22747        __tmp.put_u8(self.target_system);
22748        __tmp.put_u8(self.target_component);
22749        for val in &self.id_or_mac {
22750            __tmp.put_u8(*val);
22751        }
22752        __tmp.put_u8(self.id_type as u8);
22753        __tmp.put_u8(self.ua_type as u8);
22754        for val in &self.uas_id {
22755            __tmp.put_u8(*val);
22756        }
22757        if matches!(version, MavlinkVersion::V2) {
22758            let len = __tmp.len();
22759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22760        } else {
22761            __tmp.len()
22762        }
22763    }
22764}
22765#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22766#[doc = ""]
22767#[doc = "ID: 12901"]
22768#[derive(Debug, Clone, PartialEq)]
22769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22771#[cfg_attr(feature = "ts", derive(TS))]
22772#[cfg_attr(feature = "ts", ts(export))]
22773pub struct OPEN_DRONE_ID_LOCATION_DATA {
22774    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22775    pub latitude: i32,
22776    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22777    pub longitude: i32,
22778    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22779    pub altitude_barometric: f32,
22780    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22781    pub altitude_geodetic: f32,
22782    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22783    pub height: f32,
22784    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22785    pub timestamp: f32,
22786    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22787    pub direction: u16,
22788    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22789    pub speed_horizontal: u16,
22790    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22791    pub speed_vertical: i16,
22792    #[doc = "System ID (0 for broadcast)."]
22793    pub target_system: u8,
22794    #[doc = "Component ID (0 for broadcast)."]
22795    pub target_component: u8,
22796    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22799    pub id_or_mac: [u8; 20],
22800    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22801    pub status: MavOdidStatus,
22802    #[doc = "Indicates the reference point for the height field."]
22803    pub height_reference: MavOdidHeightRef,
22804    #[doc = "The accuracy of the horizontal position."]
22805    pub horizontal_accuracy: MavOdidHorAcc,
22806    #[doc = "The accuracy of the vertical position."]
22807    pub vertical_accuracy: MavOdidVerAcc,
22808    #[doc = "The accuracy of the barometric altitude."]
22809    pub barometer_accuracy: MavOdidVerAcc,
22810    #[doc = "The accuracy of the horizontal and vertical speed."]
22811    pub speed_accuracy: MavOdidSpeedAcc,
22812    #[doc = "The accuracy of the timestamps."]
22813    pub timestamp_accuracy: MavOdidTimeAcc,
22814}
22815impl OPEN_DRONE_ID_LOCATION_DATA {
22816    pub const ENCODED_LEN: usize = 59usize;
22817    pub const DEFAULT: Self = Self {
22818        latitude: 0_i32,
22819        longitude: 0_i32,
22820        altitude_barometric: 0.0_f32,
22821        altitude_geodetic: 0.0_f32,
22822        height: 0.0_f32,
22823        timestamp: 0.0_f32,
22824        direction: 0_u16,
22825        speed_horizontal: 0_u16,
22826        speed_vertical: 0_i16,
22827        target_system: 0_u8,
22828        target_component: 0_u8,
22829        id_or_mac: [0_u8; 20usize],
22830        status: MavOdidStatus::DEFAULT,
22831        height_reference: MavOdidHeightRef::DEFAULT,
22832        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22833        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22834        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22835        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22836        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22837    };
22838    #[cfg(feature = "arbitrary")]
22839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22840        use arbitrary::{Arbitrary, Unstructured};
22841        let mut buf = [0u8; 1024];
22842        rng.fill_bytes(&mut buf);
22843        let mut unstructured = Unstructured::new(&buf);
22844        Self::arbitrary(&mut unstructured).unwrap_or_default()
22845    }
22846}
22847impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22848    fn default() -> Self {
22849        Self::DEFAULT.clone()
22850    }
22851}
22852impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22853    type Message = MavMessage;
22854    const ID: u32 = 12901u32;
22855    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22856    const EXTRA_CRC: u8 = 254u8;
22857    const ENCODED_LEN: usize = 59usize;
22858    fn deser(
22859        _version: MavlinkVersion,
22860        __input: &[u8],
22861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22862        let avail_len = __input.len();
22863        let mut payload_buf = [0; Self::ENCODED_LEN];
22864        let mut buf = if avail_len < Self::ENCODED_LEN {
22865            payload_buf[0..avail_len].copy_from_slice(__input);
22866            Bytes::new(&payload_buf)
22867        } else {
22868            Bytes::new(__input)
22869        };
22870        let mut __struct = Self::default();
22871        __struct.latitude = buf.get_i32_le();
22872        __struct.longitude = buf.get_i32_le();
22873        __struct.altitude_barometric = buf.get_f32_le();
22874        __struct.altitude_geodetic = buf.get_f32_le();
22875        __struct.height = buf.get_f32_le();
22876        __struct.timestamp = buf.get_f32_le();
22877        __struct.direction = buf.get_u16_le();
22878        __struct.speed_horizontal = buf.get_u16_le();
22879        __struct.speed_vertical = buf.get_i16_le();
22880        __struct.target_system = buf.get_u8();
22881        __struct.target_component = buf.get_u8();
22882        for v in &mut __struct.id_or_mac {
22883            let val = buf.get_u8();
22884            *v = val;
22885        }
22886        let tmp = buf.get_u8();
22887        __struct.status =
22888            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22889                enum_type: "MavOdidStatus",
22890                value: tmp as u32,
22891            })?;
22892        let tmp = buf.get_u8();
22893        __struct.height_reference =
22894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22895                enum_type: "MavOdidHeightRef",
22896                value: tmp as u32,
22897            })?;
22898        let tmp = buf.get_u8();
22899        __struct.horizontal_accuracy =
22900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22901                enum_type: "MavOdidHorAcc",
22902                value: tmp as u32,
22903            })?;
22904        let tmp = buf.get_u8();
22905        __struct.vertical_accuracy =
22906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22907                enum_type: "MavOdidVerAcc",
22908                value: tmp as u32,
22909            })?;
22910        let tmp = buf.get_u8();
22911        __struct.barometer_accuracy =
22912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22913                enum_type: "MavOdidVerAcc",
22914                value: tmp as u32,
22915            })?;
22916        let tmp = buf.get_u8();
22917        __struct.speed_accuracy =
22918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22919                enum_type: "MavOdidSpeedAcc",
22920                value: tmp as u32,
22921            })?;
22922        let tmp = buf.get_u8();
22923        __struct.timestamp_accuracy =
22924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22925                enum_type: "MavOdidTimeAcc",
22926                value: tmp as u32,
22927            })?;
22928        Ok(__struct)
22929    }
22930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22931        let mut __tmp = BytesMut::new(bytes);
22932        #[allow(clippy::absurd_extreme_comparisons)]
22933        #[allow(unused_comparisons)]
22934        if __tmp.remaining() < Self::ENCODED_LEN {
22935            panic!(
22936                "buffer is too small (need {} bytes, but got {})",
22937                Self::ENCODED_LEN,
22938                __tmp.remaining(),
22939            )
22940        }
22941        __tmp.put_i32_le(self.latitude);
22942        __tmp.put_i32_le(self.longitude);
22943        __tmp.put_f32_le(self.altitude_barometric);
22944        __tmp.put_f32_le(self.altitude_geodetic);
22945        __tmp.put_f32_le(self.height);
22946        __tmp.put_f32_le(self.timestamp);
22947        __tmp.put_u16_le(self.direction);
22948        __tmp.put_u16_le(self.speed_horizontal);
22949        __tmp.put_i16_le(self.speed_vertical);
22950        __tmp.put_u8(self.target_system);
22951        __tmp.put_u8(self.target_component);
22952        for val in &self.id_or_mac {
22953            __tmp.put_u8(*val);
22954        }
22955        __tmp.put_u8(self.status as u8);
22956        __tmp.put_u8(self.height_reference as u8);
22957        __tmp.put_u8(self.horizontal_accuracy as u8);
22958        __tmp.put_u8(self.vertical_accuracy as u8);
22959        __tmp.put_u8(self.barometer_accuracy as u8);
22960        __tmp.put_u8(self.speed_accuracy as u8);
22961        __tmp.put_u8(self.timestamp_accuracy as u8);
22962        if matches!(version, MavlinkVersion::V2) {
22963            let len = __tmp.len();
22964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22965        } else {
22966            __tmp.len()
22967        }
22968    }
22969}
22970#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22971#[doc = ""]
22972#[doc = "ID: 12915"]
22973#[derive(Debug, Clone, PartialEq)]
22974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22976#[cfg_attr(feature = "ts", derive(TS))]
22977#[cfg_attr(feature = "ts", ts(export))]
22978pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22979    #[doc = "System ID (0 for broadcast)."]
22980    pub target_system: u8,
22981    #[doc = "Component ID (0 for broadcast)."]
22982    pub target_component: u8,
22983    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22986    pub id_or_mac: [u8; 20],
22987    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22988    pub single_message_size: u8,
22989    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22990    pub msg_pack_size: u8,
22991    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22994    pub messages: [u8; 225],
22995}
22996impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22997    pub const ENCODED_LEN: usize = 249usize;
22998    pub const DEFAULT: Self = Self {
22999        target_system: 0_u8,
23000        target_component: 0_u8,
23001        id_or_mac: [0_u8; 20usize],
23002        single_message_size: 0_u8,
23003        msg_pack_size: 0_u8,
23004        messages: [0_u8; 225usize],
23005    };
23006    #[cfg(feature = "arbitrary")]
23007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23008        use arbitrary::{Arbitrary, Unstructured};
23009        let mut buf = [0u8; 1024];
23010        rng.fill_bytes(&mut buf);
23011        let mut unstructured = Unstructured::new(&buf);
23012        Self::arbitrary(&mut unstructured).unwrap_or_default()
23013    }
23014}
23015impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23016    fn default() -> Self {
23017        Self::DEFAULT.clone()
23018    }
23019}
23020impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23021    type Message = MavMessage;
23022    const ID: u32 = 12915u32;
23023    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23024    const EXTRA_CRC: u8 = 94u8;
23025    const ENCODED_LEN: usize = 249usize;
23026    fn deser(
23027        _version: MavlinkVersion,
23028        __input: &[u8],
23029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23030        let avail_len = __input.len();
23031        let mut payload_buf = [0; Self::ENCODED_LEN];
23032        let mut buf = if avail_len < Self::ENCODED_LEN {
23033            payload_buf[0..avail_len].copy_from_slice(__input);
23034            Bytes::new(&payload_buf)
23035        } else {
23036            Bytes::new(__input)
23037        };
23038        let mut __struct = Self::default();
23039        __struct.target_system = buf.get_u8();
23040        __struct.target_component = buf.get_u8();
23041        for v in &mut __struct.id_or_mac {
23042            let val = buf.get_u8();
23043            *v = val;
23044        }
23045        __struct.single_message_size = buf.get_u8();
23046        __struct.msg_pack_size = buf.get_u8();
23047        for v in &mut __struct.messages {
23048            let val = buf.get_u8();
23049            *v = val;
23050        }
23051        Ok(__struct)
23052    }
23053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23054        let mut __tmp = BytesMut::new(bytes);
23055        #[allow(clippy::absurd_extreme_comparisons)]
23056        #[allow(unused_comparisons)]
23057        if __tmp.remaining() < Self::ENCODED_LEN {
23058            panic!(
23059                "buffer is too small (need {} bytes, but got {})",
23060                Self::ENCODED_LEN,
23061                __tmp.remaining(),
23062            )
23063        }
23064        __tmp.put_u8(self.target_system);
23065        __tmp.put_u8(self.target_component);
23066        for val in &self.id_or_mac {
23067            __tmp.put_u8(*val);
23068        }
23069        __tmp.put_u8(self.single_message_size);
23070        __tmp.put_u8(self.msg_pack_size);
23071        for val in &self.messages {
23072            __tmp.put_u8(*val);
23073        }
23074        if matches!(version, MavlinkVersion::V2) {
23075            let len = __tmp.len();
23076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23077        } else {
23078            __tmp.len()
23079        }
23080    }
23081}
23082#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23083#[doc = ""]
23084#[doc = "ID: 12905"]
23085#[derive(Debug, Clone, PartialEq)]
23086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23088#[cfg_attr(feature = "ts", derive(TS))]
23089#[cfg_attr(feature = "ts", ts(export))]
23090pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23091    #[doc = "System ID (0 for broadcast)."]
23092    pub target_system: u8,
23093    #[doc = "Component ID (0 for broadcast)."]
23094    pub target_component: u8,
23095    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23098    pub id_or_mac: [u8; 20],
23099    #[doc = "Indicates the type of the operator_id field."]
23100    pub operator_id_type: MavOdidOperatorIdType,
23101    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23102    #[cfg_attr(feature = "ts", ts(type = "string"))]
23103    pub operator_id: CharArray<20>,
23104}
23105impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23106    pub const ENCODED_LEN: usize = 43usize;
23107    pub const DEFAULT: Self = Self {
23108        target_system: 0_u8,
23109        target_component: 0_u8,
23110        id_or_mac: [0_u8; 20usize],
23111        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23112        operator_id: CharArray::new([0_u8; 20usize]),
23113    };
23114    #[cfg(feature = "arbitrary")]
23115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23116        use arbitrary::{Arbitrary, Unstructured};
23117        let mut buf = [0u8; 1024];
23118        rng.fill_bytes(&mut buf);
23119        let mut unstructured = Unstructured::new(&buf);
23120        Self::arbitrary(&mut unstructured).unwrap_or_default()
23121    }
23122}
23123impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23124    fn default() -> Self {
23125        Self::DEFAULT.clone()
23126    }
23127}
23128impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23129    type Message = MavMessage;
23130    const ID: u32 = 12905u32;
23131    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23132    const EXTRA_CRC: u8 = 49u8;
23133    const ENCODED_LEN: usize = 43usize;
23134    fn deser(
23135        _version: MavlinkVersion,
23136        __input: &[u8],
23137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23138        let avail_len = __input.len();
23139        let mut payload_buf = [0; Self::ENCODED_LEN];
23140        let mut buf = if avail_len < Self::ENCODED_LEN {
23141            payload_buf[0..avail_len].copy_from_slice(__input);
23142            Bytes::new(&payload_buf)
23143        } else {
23144            Bytes::new(__input)
23145        };
23146        let mut __struct = Self::default();
23147        __struct.target_system = buf.get_u8();
23148        __struct.target_component = buf.get_u8();
23149        for v in &mut __struct.id_or_mac {
23150            let val = buf.get_u8();
23151            *v = val;
23152        }
23153        let tmp = buf.get_u8();
23154        __struct.operator_id_type =
23155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23156                enum_type: "MavOdidOperatorIdType",
23157                value: tmp as u32,
23158            })?;
23159        let mut tmp = [0_u8; 20usize];
23160        for v in &mut tmp {
23161            *v = buf.get_u8();
23162        }
23163        __struct.operator_id = CharArray::new(tmp);
23164        Ok(__struct)
23165    }
23166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23167        let mut __tmp = BytesMut::new(bytes);
23168        #[allow(clippy::absurd_extreme_comparisons)]
23169        #[allow(unused_comparisons)]
23170        if __tmp.remaining() < Self::ENCODED_LEN {
23171            panic!(
23172                "buffer is too small (need {} bytes, but got {})",
23173                Self::ENCODED_LEN,
23174                __tmp.remaining(),
23175            )
23176        }
23177        __tmp.put_u8(self.target_system);
23178        __tmp.put_u8(self.target_component);
23179        for val in &self.id_or_mac {
23180            __tmp.put_u8(*val);
23181        }
23182        __tmp.put_u8(self.operator_id_type as u8);
23183        for val in &self.operator_id {
23184            __tmp.put_u8(*val);
23185        }
23186        if matches!(version, MavlinkVersion::V2) {
23187            let len = __tmp.len();
23188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23189        } else {
23190            __tmp.len()
23191        }
23192    }
23193}
23194#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23195#[doc = ""]
23196#[doc = "ID: 12903"]
23197#[derive(Debug, Clone, PartialEq)]
23198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23200#[cfg_attr(feature = "ts", derive(TS))]
23201#[cfg_attr(feature = "ts", ts(export))]
23202pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23203    #[doc = "System ID (0 for broadcast)."]
23204    pub target_system: u8,
23205    #[doc = "Component ID (0 for broadcast)."]
23206    pub target_component: u8,
23207    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23209    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23210    pub id_or_mac: [u8; 20],
23211    #[doc = "Indicates the type of the description field."]
23212    pub description_type: MavOdidDescType,
23213    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23214    #[cfg_attr(feature = "ts", ts(type = "string"))]
23215    pub description: CharArray<23>,
23216}
23217impl OPEN_DRONE_ID_SELF_ID_DATA {
23218    pub const ENCODED_LEN: usize = 46usize;
23219    pub const DEFAULT: Self = Self {
23220        target_system: 0_u8,
23221        target_component: 0_u8,
23222        id_or_mac: [0_u8; 20usize],
23223        description_type: MavOdidDescType::DEFAULT,
23224        description: CharArray::new([0_u8; 23usize]),
23225    };
23226    #[cfg(feature = "arbitrary")]
23227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23228        use arbitrary::{Arbitrary, Unstructured};
23229        let mut buf = [0u8; 1024];
23230        rng.fill_bytes(&mut buf);
23231        let mut unstructured = Unstructured::new(&buf);
23232        Self::arbitrary(&mut unstructured).unwrap_or_default()
23233    }
23234}
23235impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23236    fn default() -> Self {
23237        Self::DEFAULT.clone()
23238    }
23239}
23240impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23241    type Message = MavMessage;
23242    const ID: u32 = 12903u32;
23243    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23244    const EXTRA_CRC: u8 = 249u8;
23245    const ENCODED_LEN: usize = 46usize;
23246    fn deser(
23247        _version: MavlinkVersion,
23248        __input: &[u8],
23249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23250        let avail_len = __input.len();
23251        let mut payload_buf = [0; Self::ENCODED_LEN];
23252        let mut buf = if avail_len < Self::ENCODED_LEN {
23253            payload_buf[0..avail_len].copy_from_slice(__input);
23254            Bytes::new(&payload_buf)
23255        } else {
23256            Bytes::new(__input)
23257        };
23258        let mut __struct = Self::default();
23259        __struct.target_system = buf.get_u8();
23260        __struct.target_component = buf.get_u8();
23261        for v in &mut __struct.id_or_mac {
23262            let val = buf.get_u8();
23263            *v = val;
23264        }
23265        let tmp = buf.get_u8();
23266        __struct.description_type =
23267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23268                enum_type: "MavOdidDescType",
23269                value: tmp as u32,
23270            })?;
23271        let mut tmp = [0_u8; 23usize];
23272        for v in &mut tmp {
23273            *v = buf.get_u8();
23274        }
23275        __struct.description = CharArray::new(tmp);
23276        Ok(__struct)
23277    }
23278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23279        let mut __tmp = BytesMut::new(bytes);
23280        #[allow(clippy::absurd_extreme_comparisons)]
23281        #[allow(unused_comparisons)]
23282        if __tmp.remaining() < Self::ENCODED_LEN {
23283            panic!(
23284                "buffer is too small (need {} bytes, but got {})",
23285                Self::ENCODED_LEN,
23286                __tmp.remaining(),
23287            )
23288        }
23289        __tmp.put_u8(self.target_system);
23290        __tmp.put_u8(self.target_component);
23291        for val in &self.id_or_mac {
23292            __tmp.put_u8(*val);
23293        }
23294        __tmp.put_u8(self.description_type as u8);
23295        for val in &self.description {
23296            __tmp.put_u8(*val);
23297        }
23298        if matches!(version, MavlinkVersion::V2) {
23299            let len = __tmp.len();
23300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23301        } else {
23302            __tmp.len()
23303        }
23304    }
23305}
23306#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23307#[doc = ""]
23308#[doc = "ID: 12904"]
23309#[derive(Debug, Clone, PartialEq)]
23310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23312#[cfg_attr(feature = "ts", derive(TS))]
23313#[cfg_attr(feature = "ts", ts(export))]
23314pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23315    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23316    pub operator_latitude: i32,
23317    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23318    pub operator_longitude: i32,
23319    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23320    pub area_ceiling: f32,
23321    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23322    pub area_floor: f32,
23323    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23324    pub operator_altitude_geo: f32,
23325    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23326    pub timestamp: u32,
23327    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23328    pub area_count: u16,
23329    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23330    pub area_radius: u16,
23331    #[doc = "System ID (0 for broadcast)."]
23332    pub target_system: u8,
23333    #[doc = "Component ID (0 for broadcast)."]
23334    pub target_component: u8,
23335    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23338    pub id_or_mac: [u8; 20],
23339    #[doc = "Specifies the operator location type."]
23340    pub operator_location_type: MavOdidOperatorLocationType,
23341    #[doc = "Specifies the classification type of the UA."]
23342    pub classification_type: MavOdidClassificationType,
23343    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23344    pub category_eu: MavOdidCategoryEu,
23345    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23346    pub class_eu: MavOdidClassEu,
23347}
23348impl OPEN_DRONE_ID_SYSTEM_DATA {
23349    pub const ENCODED_LEN: usize = 54usize;
23350    pub const DEFAULT: Self = Self {
23351        operator_latitude: 0_i32,
23352        operator_longitude: 0_i32,
23353        area_ceiling: 0.0_f32,
23354        area_floor: 0.0_f32,
23355        operator_altitude_geo: 0.0_f32,
23356        timestamp: 0_u32,
23357        area_count: 0_u16,
23358        area_radius: 0_u16,
23359        target_system: 0_u8,
23360        target_component: 0_u8,
23361        id_or_mac: [0_u8; 20usize],
23362        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23363        classification_type: MavOdidClassificationType::DEFAULT,
23364        category_eu: MavOdidCategoryEu::DEFAULT,
23365        class_eu: MavOdidClassEu::DEFAULT,
23366    };
23367    #[cfg(feature = "arbitrary")]
23368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23369        use arbitrary::{Arbitrary, Unstructured};
23370        let mut buf = [0u8; 1024];
23371        rng.fill_bytes(&mut buf);
23372        let mut unstructured = Unstructured::new(&buf);
23373        Self::arbitrary(&mut unstructured).unwrap_or_default()
23374    }
23375}
23376impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23377    fn default() -> Self {
23378        Self::DEFAULT.clone()
23379    }
23380}
23381impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23382    type Message = MavMessage;
23383    const ID: u32 = 12904u32;
23384    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23385    const EXTRA_CRC: u8 = 77u8;
23386    const ENCODED_LEN: usize = 54usize;
23387    fn deser(
23388        _version: MavlinkVersion,
23389        __input: &[u8],
23390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23391        let avail_len = __input.len();
23392        let mut payload_buf = [0; Self::ENCODED_LEN];
23393        let mut buf = if avail_len < Self::ENCODED_LEN {
23394            payload_buf[0..avail_len].copy_from_slice(__input);
23395            Bytes::new(&payload_buf)
23396        } else {
23397            Bytes::new(__input)
23398        };
23399        let mut __struct = Self::default();
23400        __struct.operator_latitude = buf.get_i32_le();
23401        __struct.operator_longitude = buf.get_i32_le();
23402        __struct.area_ceiling = buf.get_f32_le();
23403        __struct.area_floor = buf.get_f32_le();
23404        __struct.operator_altitude_geo = buf.get_f32_le();
23405        __struct.timestamp = buf.get_u32_le();
23406        __struct.area_count = buf.get_u16_le();
23407        __struct.area_radius = buf.get_u16_le();
23408        __struct.target_system = buf.get_u8();
23409        __struct.target_component = buf.get_u8();
23410        for v in &mut __struct.id_or_mac {
23411            let val = buf.get_u8();
23412            *v = val;
23413        }
23414        let tmp = buf.get_u8();
23415        __struct.operator_location_type =
23416            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23417                enum_type: "MavOdidOperatorLocationType",
23418                value: tmp as u32,
23419            })?;
23420        let tmp = buf.get_u8();
23421        __struct.classification_type =
23422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23423                enum_type: "MavOdidClassificationType",
23424                value: tmp as u32,
23425            })?;
23426        let tmp = buf.get_u8();
23427        __struct.category_eu =
23428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23429                enum_type: "MavOdidCategoryEu",
23430                value: tmp as u32,
23431            })?;
23432        let tmp = buf.get_u8();
23433        __struct.class_eu =
23434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23435                enum_type: "MavOdidClassEu",
23436                value: tmp as u32,
23437            })?;
23438        Ok(__struct)
23439    }
23440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23441        let mut __tmp = BytesMut::new(bytes);
23442        #[allow(clippy::absurd_extreme_comparisons)]
23443        #[allow(unused_comparisons)]
23444        if __tmp.remaining() < Self::ENCODED_LEN {
23445            panic!(
23446                "buffer is too small (need {} bytes, but got {})",
23447                Self::ENCODED_LEN,
23448                __tmp.remaining(),
23449            )
23450        }
23451        __tmp.put_i32_le(self.operator_latitude);
23452        __tmp.put_i32_le(self.operator_longitude);
23453        __tmp.put_f32_le(self.area_ceiling);
23454        __tmp.put_f32_le(self.area_floor);
23455        __tmp.put_f32_le(self.operator_altitude_geo);
23456        __tmp.put_u32_le(self.timestamp);
23457        __tmp.put_u16_le(self.area_count);
23458        __tmp.put_u16_le(self.area_radius);
23459        __tmp.put_u8(self.target_system);
23460        __tmp.put_u8(self.target_component);
23461        for val in &self.id_or_mac {
23462            __tmp.put_u8(*val);
23463        }
23464        __tmp.put_u8(self.operator_location_type as u8);
23465        __tmp.put_u8(self.classification_type as u8);
23466        __tmp.put_u8(self.category_eu as u8);
23467        __tmp.put_u8(self.class_eu as u8);
23468        if matches!(version, MavlinkVersion::V2) {
23469            let len = __tmp.len();
23470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23471        } else {
23472            __tmp.len()
23473        }
23474    }
23475}
23476#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23477#[doc = ""]
23478#[doc = "ID: 12919"]
23479#[derive(Debug, Clone, PartialEq)]
23480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23482#[cfg_attr(feature = "ts", derive(TS))]
23483#[cfg_attr(feature = "ts", ts(export))]
23484pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23485    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23486    pub operator_latitude: i32,
23487    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23488    pub operator_longitude: i32,
23489    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23490    pub operator_altitude_geo: f32,
23491    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23492    pub timestamp: u32,
23493    #[doc = "System ID (0 for broadcast)."]
23494    pub target_system: u8,
23495    #[doc = "Component ID (0 for broadcast)."]
23496    pub target_component: u8,
23497}
23498impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23499    pub const ENCODED_LEN: usize = 18usize;
23500    pub const DEFAULT: Self = Self {
23501        operator_latitude: 0_i32,
23502        operator_longitude: 0_i32,
23503        operator_altitude_geo: 0.0_f32,
23504        timestamp: 0_u32,
23505        target_system: 0_u8,
23506        target_component: 0_u8,
23507    };
23508    #[cfg(feature = "arbitrary")]
23509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23510        use arbitrary::{Arbitrary, Unstructured};
23511        let mut buf = [0u8; 1024];
23512        rng.fill_bytes(&mut buf);
23513        let mut unstructured = Unstructured::new(&buf);
23514        Self::arbitrary(&mut unstructured).unwrap_or_default()
23515    }
23516}
23517impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23518    fn default() -> Self {
23519        Self::DEFAULT.clone()
23520    }
23521}
23522impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23523    type Message = MavMessage;
23524    const ID: u32 = 12919u32;
23525    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23526    const EXTRA_CRC: u8 = 7u8;
23527    const ENCODED_LEN: usize = 18usize;
23528    fn deser(
23529        _version: MavlinkVersion,
23530        __input: &[u8],
23531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23532        let avail_len = __input.len();
23533        let mut payload_buf = [0; Self::ENCODED_LEN];
23534        let mut buf = if avail_len < Self::ENCODED_LEN {
23535            payload_buf[0..avail_len].copy_from_slice(__input);
23536            Bytes::new(&payload_buf)
23537        } else {
23538            Bytes::new(__input)
23539        };
23540        let mut __struct = Self::default();
23541        __struct.operator_latitude = buf.get_i32_le();
23542        __struct.operator_longitude = buf.get_i32_le();
23543        __struct.operator_altitude_geo = buf.get_f32_le();
23544        __struct.timestamp = buf.get_u32_le();
23545        __struct.target_system = buf.get_u8();
23546        __struct.target_component = buf.get_u8();
23547        Ok(__struct)
23548    }
23549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23550        let mut __tmp = BytesMut::new(bytes);
23551        #[allow(clippy::absurd_extreme_comparisons)]
23552        #[allow(unused_comparisons)]
23553        if __tmp.remaining() < Self::ENCODED_LEN {
23554            panic!(
23555                "buffer is too small (need {} bytes, but got {})",
23556                Self::ENCODED_LEN,
23557                __tmp.remaining(),
23558            )
23559        }
23560        __tmp.put_i32_le(self.operator_latitude);
23561        __tmp.put_i32_le(self.operator_longitude);
23562        __tmp.put_f32_le(self.operator_altitude_geo);
23563        __tmp.put_u32_le(self.timestamp);
23564        __tmp.put_u8(self.target_system);
23565        __tmp.put_u8(self.target_component);
23566        if matches!(version, MavlinkVersion::V2) {
23567            let len = __tmp.len();
23568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23569        } else {
23570            __tmp.len()
23571        }
23572    }
23573}
23574#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23575#[doc = ""]
23576#[doc = "ID: 100"]
23577#[derive(Debug, Clone, PartialEq)]
23578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23580#[cfg_attr(feature = "ts", derive(TS))]
23581#[cfg_attr(feature = "ts", ts(export))]
23582pub struct OPTICAL_FLOW_DATA {
23583    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23584    pub time_usec: u64,
23585    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23586    pub flow_comp_m_x: f32,
23587    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23588    pub flow_comp_m_y: f32,
23589    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23590    pub ground_distance: f32,
23591    #[doc = "Flow in x-sensor direction"]
23592    pub flow_x: i16,
23593    #[doc = "Flow in y-sensor direction"]
23594    pub flow_y: i16,
23595    #[doc = "Sensor ID"]
23596    pub sensor_id: u8,
23597    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23598    pub quality: u8,
23599    #[doc = "Flow rate about X axis"]
23600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23601    pub flow_rate_x: f32,
23602    #[doc = "Flow rate about Y axis"]
23603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23604    pub flow_rate_y: f32,
23605}
23606impl OPTICAL_FLOW_DATA {
23607    pub const ENCODED_LEN: usize = 34usize;
23608    pub const DEFAULT: Self = Self {
23609        time_usec: 0_u64,
23610        flow_comp_m_x: 0.0_f32,
23611        flow_comp_m_y: 0.0_f32,
23612        ground_distance: 0.0_f32,
23613        flow_x: 0_i16,
23614        flow_y: 0_i16,
23615        sensor_id: 0_u8,
23616        quality: 0_u8,
23617        flow_rate_x: 0.0_f32,
23618        flow_rate_y: 0.0_f32,
23619    };
23620    #[cfg(feature = "arbitrary")]
23621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23622        use arbitrary::{Arbitrary, Unstructured};
23623        let mut buf = [0u8; 1024];
23624        rng.fill_bytes(&mut buf);
23625        let mut unstructured = Unstructured::new(&buf);
23626        Self::arbitrary(&mut unstructured).unwrap_or_default()
23627    }
23628}
23629impl Default for OPTICAL_FLOW_DATA {
23630    fn default() -> Self {
23631        Self::DEFAULT.clone()
23632    }
23633}
23634impl MessageData for OPTICAL_FLOW_DATA {
23635    type Message = MavMessage;
23636    const ID: u32 = 100u32;
23637    const NAME: &'static str = "OPTICAL_FLOW";
23638    const EXTRA_CRC: u8 = 175u8;
23639    const ENCODED_LEN: usize = 34usize;
23640    fn deser(
23641        _version: MavlinkVersion,
23642        __input: &[u8],
23643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23644        let avail_len = __input.len();
23645        let mut payload_buf = [0; Self::ENCODED_LEN];
23646        let mut buf = if avail_len < Self::ENCODED_LEN {
23647            payload_buf[0..avail_len].copy_from_slice(__input);
23648            Bytes::new(&payload_buf)
23649        } else {
23650            Bytes::new(__input)
23651        };
23652        let mut __struct = Self::default();
23653        __struct.time_usec = buf.get_u64_le();
23654        __struct.flow_comp_m_x = buf.get_f32_le();
23655        __struct.flow_comp_m_y = buf.get_f32_le();
23656        __struct.ground_distance = buf.get_f32_le();
23657        __struct.flow_x = buf.get_i16_le();
23658        __struct.flow_y = buf.get_i16_le();
23659        __struct.sensor_id = buf.get_u8();
23660        __struct.quality = buf.get_u8();
23661        __struct.flow_rate_x = buf.get_f32_le();
23662        __struct.flow_rate_y = buf.get_f32_le();
23663        Ok(__struct)
23664    }
23665    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23666        let mut __tmp = BytesMut::new(bytes);
23667        #[allow(clippy::absurd_extreme_comparisons)]
23668        #[allow(unused_comparisons)]
23669        if __tmp.remaining() < Self::ENCODED_LEN {
23670            panic!(
23671                "buffer is too small (need {} bytes, but got {})",
23672                Self::ENCODED_LEN,
23673                __tmp.remaining(),
23674            )
23675        }
23676        __tmp.put_u64_le(self.time_usec);
23677        __tmp.put_f32_le(self.flow_comp_m_x);
23678        __tmp.put_f32_le(self.flow_comp_m_y);
23679        __tmp.put_f32_le(self.ground_distance);
23680        __tmp.put_i16_le(self.flow_x);
23681        __tmp.put_i16_le(self.flow_y);
23682        __tmp.put_u8(self.sensor_id);
23683        __tmp.put_u8(self.quality);
23684        if matches!(version, MavlinkVersion::V2) {
23685            __tmp.put_f32_le(self.flow_rate_x);
23686            __tmp.put_f32_le(self.flow_rate_y);
23687            let len = __tmp.len();
23688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23689        } else {
23690            __tmp.len()
23691        }
23692    }
23693}
23694#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23695#[doc = ""]
23696#[doc = "ID: 106"]
23697#[derive(Debug, Clone, PartialEq)]
23698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23700#[cfg_attr(feature = "ts", derive(TS))]
23701#[cfg_attr(feature = "ts", ts(export))]
23702pub struct OPTICAL_FLOW_RAD_DATA {
23703    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23704    pub time_usec: u64,
23705    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23706    pub integration_time_us: u32,
23707    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23708    pub integrated_x: f32,
23709    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23710    pub integrated_y: f32,
23711    #[doc = "RH rotation around X axis"]
23712    pub integrated_xgyro: f32,
23713    #[doc = "RH rotation around Y axis"]
23714    pub integrated_ygyro: f32,
23715    #[doc = "RH rotation around Z axis"]
23716    pub integrated_zgyro: f32,
23717    #[doc = "Time since the distance was sampled."]
23718    pub time_delta_distance_us: u32,
23719    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23720    pub distance: f32,
23721    #[doc = "Temperature"]
23722    pub temperature: i16,
23723    #[doc = "Sensor ID"]
23724    pub sensor_id: u8,
23725    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23726    pub quality: u8,
23727}
23728impl OPTICAL_FLOW_RAD_DATA {
23729    pub const ENCODED_LEN: usize = 44usize;
23730    pub const DEFAULT: Self = Self {
23731        time_usec: 0_u64,
23732        integration_time_us: 0_u32,
23733        integrated_x: 0.0_f32,
23734        integrated_y: 0.0_f32,
23735        integrated_xgyro: 0.0_f32,
23736        integrated_ygyro: 0.0_f32,
23737        integrated_zgyro: 0.0_f32,
23738        time_delta_distance_us: 0_u32,
23739        distance: 0.0_f32,
23740        temperature: 0_i16,
23741        sensor_id: 0_u8,
23742        quality: 0_u8,
23743    };
23744    #[cfg(feature = "arbitrary")]
23745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23746        use arbitrary::{Arbitrary, Unstructured};
23747        let mut buf = [0u8; 1024];
23748        rng.fill_bytes(&mut buf);
23749        let mut unstructured = Unstructured::new(&buf);
23750        Self::arbitrary(&mut unstructured).unwrap_or_default()
23751    }
23752}
23753impl Default for OPTICAL_FLOW_RAD_DATA {
23754    fn default() -> Self {
23755        Self::DEFAULT.clone()
23756    }
23757}
23758impl MessageData for OPTICAL_FLOW_RAD_DATA {
23759    type Message = MavMessage;
23760    const ID: u32 = 106u32;
23761    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23762    const EXTRA_CRC: u8 = 138u8;
23763    const ENCODED_LEN: usize = 44usize;
23764    fn deser(
23765        _version: MavlinkVersion,
23766        __input: &[u8],
23767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23768        let avail_len = __input.len();
23769        let mut payload_buf = [0; Self::ENCODED_LEN];
23770        let mut buf = if avail_len < Self::ENCODED_LEN {
23771            payload_buf[0..avail_len].copy_from_slice(__input);
23772            Bytes::new(&payload_buf)
23773        } else {
23774            Bytes::new(__input)
23775        };
23776        let mut __struct = Self::default();
23777        __struct.time_usec = buf.get_u64_le();
23778        __struct.integration_time_us = buf.get_u32_le();
23779        __struct.integrated_x = buf.get_f32_le();
23780        __struct.integrated_y = buf.get_f32_le();
23781        __struct.integrated_xgyro = buf.get_f32_le();
23782        __struct.integrated_ygyro = buf.get_f32_le();
23783        __struct.integrated_zgyro = buf.get_f32_le();
23784        __struct.time_delta_distance_us = buf.get_u32_le();
23785        __struct.distance = buf.get_f32_le();
23786        __struct.temperature = buf.get_i16_le();
23787        __struct.sensor_id = buf.get_u8();
23788        __struct.quality = buf.get_u8();
23789        Ok(__struct)
23790    }
23791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23792        let mut __tmp = BytesMut::new(bytes);
23793        #[allow(clippy::absurd_extreme_comparisons)]
23794        #[allow(unused_comparisons)]
23795        if __tmp.remaining() < Self::ENCODED_LEN {
23796            panic!(
23797                "buffer is too small (need {} bytes, but got {})",
23798                Self::ENCODED_LEN,
23799                __tmp.remaining(),
23800            )
23801        }
23802        __tmp.put_u64_le(self.time_usec);
23803        __tmp.put_u32_le(self.integration_time_us);
23804        __tmp.put_f32_le(self.integrated_x);
23805        __tmp.put_f32_le(self.integrated_y);
23806        __tmp.put_f32_le(self.integrated_xgyro);
23807        __tmp.put_f32_le(self.integrated_ygyro);
23808        __tmp.put_f32_le(self.integrated_zgyro);
23809        __tmp.put_u32_le(self.time_delta_distance_us);
23810        __tmp.put_f32_le(self.distance);
23811        __tmp.put_i16_le(self.temperature);
23812        __tmp.put_u8(self.sensor_id);
23813        __tmp.put_u8(self.quality);
23814        if matches!(version, MavlinkVersion::V2) {
23815            let len = __tmp.len();
23816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23817        } else {
23818            __tmp.len()
23819        }
23820    }
23821}
23822#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23823#[doc = ""]
23824#[doc = "ID: 360"]
23825#[derive(Debug, Clone, PartialEq)]
23826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23828#[cfg_attr(feature = "ts", derive(TS))]
23829#[cfg_attr(feature = "ts", ts(export))]
23830pub struct ORBIT_EXECUTION_STATUS_DATA {
23831    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23832    pub time_usec: u64,
23833    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23834    pub radius: f32,
23835    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23836    pub x: i32,
23837    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23838    pub y: i32,
23839    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23840    pub z: f32,
23841    #[doc = "The coordinate system of the fields: x, y, z."]
23842    pub frame: MavFrame,
23843}
23844impl ORBIT_EXECUTION_STATUS_DATA {
23845    pub const ENCODED_LEN: usize = 25usize;
23846    pub const DEFAULT: Self = Self {
23847        time_usec: 0_u64,
23848        radius: 0.0_f32,
23849        x: 0_i32,
23850        y: 0_i32,
23851        z: 0.0_f32,
23852        frame: MavFrame::DEFAULT,
23853    };
23854    #[cfg(feature = "arbitrary")]
23855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23856        use arbitrary::{Arbitrary, Unstructured};
23857        let mut buf = [0u8; 1024];
23858        rng.fill_bytes(&mut buf);
23859        let mut unstructured = Unstructured::new(&buf);
23860        Self::arbitrary(&mut unstructured).unwrap_or_default()
23861    }
23862}
23863impl Default for ORBIT_EXECUTION_STATUS_DATA {
23864    fn default() -> Self {
23865        Self::DEFAULT.clone()
23866    }
23867}
23868impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23869    type Message = MavMessage;
23870    const ID: u32 = 360u32;
23871    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23872    const EXTRA_CRC: u8 = 11u8;
23873    const ENCODED_LEN: usize = 25usize;
23874    fn deser(
23875        _version: MavlinkVersion,
23876        __input: &[u8],
23877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23878        let avail_len = __input.len();
23879        let mut payload_buf = [0; Self::ENCODED_LEN];
23880        let mut buf = if avail_len < Self::ENCODED_LEN {
23881            payload_buf[0..avail_len].copy_from_slice(__input);
23882            Bytes::new(&payload_buf)
23883        } else {
23884            Bytes::new(__input)
23885        };
23886        let mut __struct = Self::default();
23887        __struct.time_usec = buf.get_u64_le();
23888        __struct.radius = buf.get_f32_le();
23889        __struct.x = buf.get_i32_le();
23890        __struct.y = buf.get_i32_le();
23891        __struct.z = buf.get_f32_le();
23892        let tmp = buf.get_u8();
23893        __struct.frame =
23894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23895                enum_type: "MavFrame",
23896                value: tmp as u32,
23897            })?;
23898        Ok(__struct)
23899    }
23900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23901        let mut __tmp = BytesMut::new(bytes);
23902        #[allow(clippy::absurd_extreme_comparisons)]
23903        #[allow(unused_comparisons)]
23904        if __tmp.remaining() < Self::ENCODED_LEN {
23905            panic!(
23906                "buffer is too small (need {} bytes, but got {})",
23907                Self::ENCODED_LEN,
23908                __tmp.remaining(),
23909            )
23910        }
23911        __tmp.put_u64_le(self.time_usec);
23912        __tmp.put_f32_le(self.radius);
23913        __tmp.put_i32_le(self.x);
23914        __tmp.put_i32_le(self.y);
23915        __tmp.put_f32_le(self.z);
23916        __tmp.put_u8(self.frame as u8);
23917        if matches!(version, MavlinkVersion::V2) {
23918            let len = __tmp.len();
23919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23920        } else {
23921            __tmp.len()
23922        }
23923    }
23924}
23925#[doc = "Response from a PARAM_EXT_SET message."]
23926#[doc = ""]
23927#[doc = "ID: 324"]
23928#[derive(Debug, Clone, PartialEq)]
23929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23931#[cfg_attr(feature = "ts", derive(TS))]
23932#[cfg_attr(feature = "ts", ts(export))]
23933pub struct PARAM_EXT_ACK_DATA {
23934    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23935    #[cfg_attr(feature = "ts", ts(type = "string"))]
23936    pub param_id: CharArray<16>,
23937    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23938    #[cfg_attr(feature = "ts", ts(type = "string"))]
23939    pub param_value: CharArray<128>,
23940    #[doc = "Parameter type."]
23941    pub param_type: MavParamExtType,
23942    #[doc = "Result code."]
23943    pub param_result: ParamAck,
23944}
23945impl PARAM_EXT_ACK_DATA {
23946    pub const ENCODED_LEN: usize = 146usize;
23947    pub const DEFAULT: Self = Self {
23948        param_id: CharArray::new([0_u8; 16usize]),
23949        param_value: CharArray::new([0_u8; 128usize]),
23950        param_type: MavParamExtType::DEFAULT,
23951        param_result: ParamAck::DEFAULT,
23952    };
23953    #[cfg(feature = "arbitrary")]
23954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23955        use arbitrary::{Arbitrary, Unstructured};
23956        let mut buf = [0u8; 1024];
23957        rng.fill_bytes(&mut buf);
23958        let mut unstructured = Unstructured::new(&buf);
23959        Self::arbitrary(&mut unstructured).unwrap_or_default()
23960    }
23961}
23962impl Default for PARAM_EXT_ACK_DATA {
23963    fn default() -> Self {
23964        Self::DEFAULT.clone()
23965    }
23966}
23967impl MessageData for PARAM_EXT_ACK_DATA {
23968    type Message = MavMessage;
23969    const ID: u32 = 324u32;
23970    const NAME: &'static str = "PARAM_EXT_ACK";
23971    const EXTRA_CRC: u8 = 132u8;
23972    const ENCODED_LEN: usize = 146usize;
23973    fn deser(
23974        _version: MavlinkVersion,
23975        __input: &[u8],
23976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23977        let avail_len = __input.len();
23978        let mut payload_buf = [0; Self::ENCODED_LEN];
23979        let mut buf = if avail_len < Self::ENCODED_LEN {
23980            payload_buf[0..avail_len].copy_from_slice(__input);
23981            Bytes::new(&payload_buf)
23982        } else {
23983            Bytes::new(__input)
23984        };
23985        let mut __struct = Self::default();
23986        let mut tmp = [0_u8; 16usize];
23987        for v in &mut tmp {
23988            *v = buf.get_u8();
23989        }
23990        __struct.param_id = CharArray::new(tmp);
23991        let mut tmp = [0_u8; 128usize];
23992        for v in &mut tmp {
23993            *v = buf.get_u8();
23994        }
23995        __struct.param_value = CharArray::new(tmp);
23996        let tmp = buf.get_u8();
23997        __struct.param_type =
23998            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23999                enum_type: "MavParamExtType",
24000                value: tmp as u32,
24001            })?;
24002        let tmp = buf.get_u8();
24003        __struct.param_result =
24004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24005                enum_type: "ParamAck",
24006                value: tmp as u32,
24007            })?;
24008        Ok(__struct)
24009    }
24010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24011        let mut __tmp = BytesMut::new(bytes);
24012        #[allow(clippy::absurd_extreme_comparisons)]
24013        #[allow(unused_comparisons)]
24014        if __tmp.remaining() < Self::ENCODED_LEN {
24015            panic!(
24016                "buffer is too small (need {} bytes, but got {})",
24017                Self::ENCODED_LEN,
24018                __tmp.remaining(),
24019            )
24020        }
24021        for val in &self.param_id {
24022            __tmp.put_u8(*val);
24023        }
24024        for val in &self.param_value {
24025            __tmp.put_u8(*val);
24026        }
24027        __tmp.put_u8(self.param_type as u8);
24028        __tmp.put_u8(self.param_result as u8);
24029        if matches!(version, MavlinkVersion::V2) {
24030            let len = __tmp.len();
24031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24032        } else {
24033            __tmp.len()
24034        }
24035    }
24036}
24037#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24038#[doc = ""]
24039#[doc = "ID: 321"]
24040#[derive(Debug, Clone, PartialEq)]
24041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24043#[cfg_attr(feature = "ts", derive(TS))]
24044#[cfg_attr(feature = "ts", ts(export))]
24045pub struct PARAM_EXT_REQUEST_LIST_DATA {
24046    #[doc = "System ID"]
24047    pub target_system: u8,
24048    #[doc = "Component ID"]
24049    pub target_component: u8,
24050}
24051impl PARAM_EXT_REQUEST_LIST_DATA {
24052    pub const ENCODED_LEN: usize = 2usize;
24053    pub const DEFAULT: Self = Self {
24054        target_system: 0_u8,
24055        target_component: 0_u8,
24056    };
24057    #[cfg(feature = "arbitrary")]
24058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24059        use arbitrary::{Arbitrary, Unstructured};
24060        let mut buf = [0u8; 1024];
24061        rng.fill_bytes(&mut buf);
24062        let mut unstructured = Unstructured::new(&buf);
24063        Self::arbitrary(&mut unstructured).unwrap_or_default()
24064    }
24065}
24066impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24067    fn default() -> Self {
24068        Self::DEFAULT.clone()
24069    }
24070}
24071impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24072    type Message = MavMessage;
24073    const ID: u32 = 321u32;
24074    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24075    const EXTRA_CRC: u8 = 88u8;
24076    const ENCODED_LEN: usize = 2usize;
24077    fn deser(
24078        _version: MavlinkVersion,
24079        __input: &[u8],
24080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24081        let avail_len = __input.len();
24082        let mut payload_buf = [0; Self::ENCODED_LEN];
24083        let mut buf = if avail_len < Self::ENCODED_LEN {
24084            payload_buf[0..avail_len].copy_from_slice(__input);
24085            Bytes::new(&payload_buf)
24086        } else {
24087            Bytes::new(__input)
24088        };
24089        let mut __struct = Self::default();
24090        __struct.target_system = buf.get_u8();
24091        __struct.target_component = buf.get_u8();
24092        Ok(__struct)
24093    }
24094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24095        let mut __tmp = BytesMut::new(bytes);
24096        #[allow(clippy::absurd_extreme_comparisons)]
24097        #[allow(unused_comparisons)]
24098        if __tmp.remaining() < Self::ENCODED_LEN {
24099            panic!(
24100                "buffer is too small (need {} bytes, but got {})",
24101                Self::ENCODED_LEN,
24102                __tmp.remaining(),
24103            )
24104        }
24105        __tmp.put_u8(self.target_system);
24106        __tmp.put_u8(self.target_component);
24107        if matches!(version, MavlinkVersion::V2) {
24108            let len = __tmp.len();
24109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24110        } else {
24111            __tmp.len()
24112        }
24113    }
24114}
24115#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24116#[doc = ""]
24117#[doc = "ID: 320"]
24118#[derive(Debug, Clone, PartialEq)]
24119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24121#[cfg_attr(feature = "ts", derive(TS))]
24122#[cfg_attr(feature = "ts", ts(export))]
24123pub struct PARAM_EXT_REQUEST_READ_DATA {
24124    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24125    pub param_index: i16,
24126    #[doc = "System ID"]
24127    pub target_system: u8,
24128    #[doc = "Component ID"]
24129    pub target_component: u8,
24130    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24131    #[cfg_attr(feature = "ts", ts(type = "string"))]
24132    pub param_id: CharArray<16>,
24133}
24134impl PARAM_EXT_REQUEST_READ_DATA {
24135    pub const ENCODED_LEN: usize = 20usize;
24136    pub const DEFAULT: Self = Self {
24137        param_index: 0_i16,
24138        target_system: 0_u8,
24139        target_component: 0_u8,
24140        param_id: CharArray::new([0_u8; 16usize]),
24141    };
24142    #[cfg(feature = "arbitrary")]
24143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24144        use arbitrary::{Arbitrary, Unstructured};
24145        let mut buf = [0u8; 1024];
24146        rng.fill_bytes(&mut buf);
24147        let mut unstructured = Unstructured::new(&buf);
24148        Self::arbitrary(&mut unstructured).unwrap_or_default()
24149    }
24150}
24151impl Default for PARAM_EXT_REQUEST_READ_DATA {
24152    fn default() -> Self {
24153        Self::DEFAULT.clone()
24154    }
24155}
24156impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24157    type Message = MavMessage;
24158    const ID: u32 = 320u32;
24159    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24160    const EXTRA_CRC: u8 = 243u8;
24161    const ENCODED_LEN: usize = 20usize;
24162    fn deser(
24163        _version: MavlinkVersion,
24164        __input: &[u8],
24165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24166        let avail_len = __input.len();
24167        let mut payload_buf = [0; Self::ENCODED_LEN];
24168        let mut buf = if avail_len < Self::ENCODED_LEN {
24169            payload_buf[0..avail_len].copy_from_slice(__input);
24170            Bytes::new(&payload_buf)
24171        } else {
24172            Bytes::new(__input)
24173        };
24174        let mut __struct = Self::default();
24175        __struct.param_index = buf.get_i16_le();
24176        __struct.target_system = buf.get_u8();
24177        __struct.target_component = buf.get_u8();
24178        let mut tmp = [0_u8; 16usize];
24179        for v in &mut tmp {
24180            *v = buf.get_u8();
24181        }
24182        __struct.param_id = CharArray::new(tmp);
24183        Ok(__struct)
24184    }
24185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24186        let mut __tmp = BytesMut::new(bytes);
24187        #[allow(clippy::absurd_extreme_comparisons)]
24188        #[allow(unused_comparisons)]
24189        if __tmp.remaining() < Self::ENCODED_LEN {
24190            panic!(
24191                "buffer is too small (need {} bytes, but got {})",
24192                Self::ENCODED_LEN,
24193                __tmp.remaining(),
24194            )
24195        }
24196        __tmp.put_i16_le(self.param_index);
24197        __tmp.put_u8(self.target_system);
24198        __tmp.put_u8(self.target_component);
24199        for val in &self.param_id {
24200            __tmp.put_u8(*val);
24201        }
24202        if matches!(version, MavlinkVersion::V2) {
24203            let len = __tmp.len();
24204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24205        } else {
24206            __tmp.len()
24207        }
24208    }
24209}
24210#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24211#[doc = ""]
24212#[doc = "ID: 323"]
24213#[derive(Debug, Clone, PartialEq)]
24214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24216#[cfg_attr(feature = "ts", derive(TS))]
24217#[cfg_attr(feature = "ts", ts(export))]
24218pub struct PARAM_EXT_SET_DATA {
24219    #[doc = "System ID"]
24220    pub target_system: u8,
24221    #[doc = "Component ID"]
24222    pub target_component: u8,
24223    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24224    #[cfg_attr(feature = "ts", ts(type = "string"))]
24225    pub param_id: CharArray<16>,
24226    #[doc = "Parameter value"]
24227    #[cfg_attr(feature = "ts", ts(type = "string"))]
24228    pub param_value: CharArray<128>,
24229    #[doc = "Parameter type."]
24230    pub param_type: MavParamExtType,
24231}
24232impl PARAM_EXT_SET_DATA {
24233    pub const ENCODED_LEN: usize = 147usize;
24234    pub const DEFAULT: Self = Self {
24235        target_system: 0_u8,
24236        target_component: 0_u8,
24237        param_id: CharArray::new([0_u8; 16usize]),
24238        param_value: CharArray::new([0_u8; 128usize]),
24239        param_type: MavParamExtType::DEFAULT,
24240    };
24241    #[cfg(feature = "arbitrary")]
24242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24243        use arbitrary::{Arbitrary, Unstructured};
24244        let mut buf = [0u8; 1024];
24245        rng.fill_bytes(&mut buf);
24246        let mut unstructured = Unstructured::new(&buf);
24247        Self::arbitrary(&mut unstructured).unwrap_or_default()
24248    }
24249}
24250impl Default for PARAM_EXT_SET_DATA {
24251    fn default() -> Self {
24252        Self::DEFAULT.clone()
24253    }
24254}
24255impl MessageData for PARAM_EXT_SET_DATA {
24256    type Message = MavMessage;
24257    const ID: u32 = 323u32;
24258    const NAME: &'static str = "PARAM_EXT_SET";
24259    const EXTRA_CRC: u8 = 78u8;
24260    const ENCODED_LEN: usize = 147usize;
24261    fn deser(
24262        _version: MavlinkVersion,
24263        __input: &[u8],
24264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24265        let avail_len = __input.len();
24266        let mut payload_buf = [0; Self::ENCODED_LEN];
24267        let mut buf = if avail_len < Self::ENCODED_LEN {
24268            payload_buf[0..avail_len].copy_from_slice(__input);
24269            Bytes::new(&payload_buf)
24270        } else {
24271            Bytes::new(__input)
24272        };
24273        let mut __struct = Self::default();
24274        __struct.target_system = buf.get_u8();
24275        __struct.target_component = buf.get_u8();
24276        let mut tmp = [0_u8; 16usize];
24277        for v in &mut tmp {
24278            *v = buf.get_u8();
24279        }
24280        __struct.param_id = CharArray::new(tmp);
24281        let mut tmp = [0_u8; 128usize];
24282        for v in &mut tmp {
24283            *v = buf.get_u8();
24284        }
24285        __struct.param_value = CharArray::new(tmp);
24286        let tmp = buf.get_u8();
24287        __struct.param_type =
24288            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24289                enum_type: "MavParamExtType",
24290                value: tmp as u32,
24291            })?;
24292        Ok(__struct)
24293    }
24294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24295        let mut __tmp = BytesMut::new(bytes);
24296        #[allow(clippy::absurd_extreme_comparisons)]
24297        #[allow(unused_comparisons)]
24298        if __tmp.remaining() < Self::ENCODED_LEN {
24299            panic!(
24300                "buffer is too small (need {} bytes, but got {})",
24301                Self::ENCODED_LEN,
24302                __tmp.remaining(),
24303            )
24304        }
24305        __tmp.put_u8(self.target_system);
24306        __tmp.put_u8(self.target_component);
24307        for val in &self.param_id {
24308            __tmp.put_u8(*val);
24309        }
24310        for val in &self.param_value {
24311            __tmp.put_u8(*val);
24312        }
24313        __tmp.put_u8(self.param_type as u8);
24314        if matches!(version, MavlinkVersion::V2) {
24315            let len = __tmp.len();
24316            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24317        } else {
24318            __tmp.len()
24319        }
24320    }
24321}
24322#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24323#[doc = ""]
24324#[doc = "ID: 322"]
24325#[derive(Debug, Clone, PartialEq)]
24326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24328#[cfg_attr(feature = "ts", derive(TS))]
24329#[cfg_attr(feature = "ts", ts(export))]
24330pub struct PARAM_EXT_VALUE_DATA {
24331    #[doc = "Total number of parameters"]
24332    pub param_count: u16,
24333    #[doc = "Index of this parameter"]
24334    pub param_index: u16,
24335    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24336    #[cfg_attr(feature = "ts", ts(type = "string"))]
24337    pub param_id: CharArray<16>,
24338    #[doc = "Parameter value"]
24339    #[cfg_attr(feature = "ts", ts(type = "string"))]
24340    pub param_value: CharArray<128>,
24341    #[doc = "Parameter type."]
24342    pub param_type: MavParamExtType,
24343}
24344impl PARAM_EXT_VALUE_DATA {
24345    pub const ENCODED_LEN: usize = 149usize;
24346    pub const DEFAULT: Self = Self {
24347        param_count: 0_u16,
24348        param_index: 0_u16,
24349        param_id: CharArray::new([0_u8; 16usize]),
24350        param_value: CharArray::new([0_u8; 128usize]),
24351        param_type: MavParamExtType::DEFAULT,
24352    };
24353    #[cfg(feature = "arbitrary")]
24354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24355        use arbitrary::{Arbitrary, Unstructured};
24356        let mut buf = [0u8; 1024];
24357        rng.fill_bytes(&mut buf);
24358        let mut unstructured = Unstructured::new(&buf);
24359        Self::arbitrary(&mut unstructured).unwrap_or_default()
24360    }
24361}
24362impl Default for PARAM_EXT_VALUE_DATA {
24363    fn default() -> Self {
24364        Self::DEFAULT.clone()
24365    }
24366}
24367impl MessageData for PARAM_EXT_VALUE_DATA {
24368    type Message = MavMessage;
24369    const ID: u32 = 322u32;
24370    const NAME: &'static str = "PARAM_EXT_VALUE";
24371    const EXTRA_CRC: u8 = 243u8;
24372    const ENCODED_LEN: usize = 149usize;
24373    fn deser(
24374        _version: MavlinkVersion,
24375        __input: &[u8],
24376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24377        let avail_len = __input.len();
24378        let mut payload_buf = [0; Self::ENCODED_LEN];
24379        let mut buf = if avail_len < Self::ENCODED_LEN {
24380            payload_buf[0..avail_len].copy_from_slice(__input);
24381            Bytes::new(&payload_buf)
24382        } else {
24383            Bytes::new(__input)
24384        };
24385        let mut __struct = Self::default();
24386        __struct.param_count = buf.get_u16_le();
24387        __struct.param_index = buf.get_u16_le();
24388        let mut tmp = [0_u8; 16usize];
24389        for v in &mut tmp {
24390            *v = buf.get_u8();
24391        }
24392        __struct.param_id = CharArray::new(tmp);
24393        let mut tmp = [0_u8; 128usize];
24394        for v in &mut tmp {
24395            *v = buf.get_u8();
24396        }
24397        __struct.param_value = CharArray::new(tmp);
24398        let tmp = buf.get_u8();
24399        __struct.param_type =
24400            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24401                enum_type: "MavParamExtType",
24402                value: tmp as u32,
24403            })?;
24404        Ok(__struct)
24405    }
24406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24407        let mut __tmp = BytesMut::new(bytes);
24408        #[allow(clippy::absurd_extreme_comparisons)]
24409        #[allow(unused_comparisons)]
24410        if __tmp.remaining() < Self::ENCODED_LEN {
24411            panic!(
24412                "buffer is too small (need {} bytes, but got {})",
24413                Self::ENCODED_LEN,
24414                __tmp.remaining(),
24415            )
24416        }
24417        __tmp.put_u16_le(self.param_count);
24418        __tmp.put_u16_le(self.param_index);
24419        for val in &self.param_id {
24420            __tmp.put_u8(*val);
24421        }
24422        for val in &self.param_value {
24423            __tmp.put_u8(*val);
24424        }
24425        __tmp.put_u8(self.param_type as u8);
24426        if matches!(version, MavlinkVersion::V2) {
24427            let len = __tmp.len();
24428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24429        } else {
24430            __tmp.len()
24431        }
24432    }
24433}
24434#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24435#[doc = ""]
24436#[doc = "ID: 50"]
24437#[derive(Debug, Clone, PartialEq)]
24438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24440#[cfg_attr(feature = "ts", derive(TS))]
24441#[cfg_attr(feature = "ts", ts(export))]
24442pub struct PARAM_MAP_RC_DATA {
24443    #[doc = "Initial parameter value"]
24444    pub param_value0: f32,
24445    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24446    pub scale: f32,
24447    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24448    pub param_value_min: f32,
24449    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24450    pub param_value_max: f32,
24451    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24452    pub param_index: i16,
24453    #[doc = "System ID"]
24454    pub target_system: u8,
24455    #[doc = "Component ID"]
24456    pub target_component: u8,
24457    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24458    #[cfg_attr(feature = "ts", ts(type = "string"))]
24459    pub param_id: CharArray<16>,
24460    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24461    pub parameter_rc_channel_index: u8,
24462}
24463impl PARAM_MAP_RC_DATA {
24464    pub const ENCODED_LEN: usize = 37usize;
24465    pub const DEFAULT: Self = Self {
24466        param_value0: 0.0_f32,
24467        scale: 0.0_f32,
24468        param_value_min: 0.0_f32,
24469        param_value_max: 0.0_f32,
24470        param_index: 0_i16,
24471        target_system: 0_u8,
24472        target_component: 0_u8,
24473        param_id: CharArray::new([0_u8; 16usize]),
24474        parameter_rc_channel_index: 0_u8,
24475    };
24476    #[cfg(feature = "arbitrary")]
24477    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24478        use arbitrary::{Arbitrary, Unstructured};
24479        let mut buf = [0u8; 1024];
24480        rng.fill_bytes(&mut buf);
24481        let mut unstructured = Unstructured::new(&buf);
24482        Self::arbitrary(&mut unstructured).unwrap_or_default()
24483    }
24484}
24485impl Default for PARAM_MAP_RC_DATA {
24486    fn default() -> Self {
24487        Self::DEFAULT.clone()
24488    }
24489}
24490impl MessageData for PARAM_MAP_RC_DATA {
24491    type Message = MavMessage;
24492    const ID: u32 = 50u32;
24493    const NAME: &'static str = "PARAM_MAP_RC";
24494    const EXTRA_CRC: u8 = 78u8;
24495    const ENCODED_LEN: usize = 37usize;
24496    fn deser(
24497        _version: MavlinkVersion,
24498        __input: &[u8],
24499    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24500        let avail_len = __input.len();
24501        let mut payload_buf = [0; Self::ENCODED_LEN];
24502        let mut buf = if avail_len < Self::ENCODED_LEN {
24503            payload_buf[0..avail_len].copy_from_slice(__input);
24504            Bytes::new(&payload_buf)
24505        } else {
24506            Bytes::new(__input)
24507        };
24508        let mut __struct = Self::default();
24509        __struct.param_value0 = buf.get_f32_le();
24510        __struct.scale = buf.get_f32_le();
24511        __struct.param_value_min = buf.get_f32_le();
24512        __struct.param_value_max = buf.get_f32_le();
24513        __struct.param_index = buf.get_i16_le();
24514        __struct.target_system = buf.get_u8();
24515        __struct.target_component = buf.get_u8();
24516        let mut tmp = [0_u8; 16usize];
24517        for v in &mut tmp {
24518            *v = buf.get_u8();
24519        }
24520        __struct.param_id = CharArray::new(tmp);
24521        __struct.parameter_rc_channel_index = buf.get_u8();
24522        Ok(__struct)
24523    }
24524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24525        let mut __tmp = BytesMut::new(bytes);
24526        #[allow(clippy::absurd_extreme_comparisons)]
24527        #[allow(unused_comparisons)]
24528        if __tmp.remaining() < Self::ENCODED_LEN {
24529            panic!(
24530                "buffer is too small (need {} bytes, but got {})",
24531                Self::ENCODED_LEN,
24532                __tmp.remaining(),
24533            )
24534        }
24535        __tmp.put_f32_le(self.param_value0);
24536        __tmp.put_f32_le(self.scale);
24537        __tmp.put_f32_le(self.param_value_min);
24538        __tmp.put_f32_le(self.param_value_max);
24539        __tmp.put_i16_le(self.param_index);
24540        __tmp.put_u8(self.target_system);
24541        __tmp.put_u8(self.target_component);
24542        for val in &self.param_id {
24543            __tmp.put_u8(*val);
24544        }
24545        __tmp.put_u8(self.parameter_rc_channel_index);
24546        if matches!(version, MavlinkVersion::V2) {
24547            let len = __tmp.len();
24548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24549        } else {
24550            __tmp.len()
24551        }
24552    }
24553}
24554#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24555#[doc = ""]
24556#[doc = "ID: 21"]
24557#[derive(Debug, Clone, PartialEq)]
24558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24560#[cfg_attr(feature = "ts", derive(TS))]
24561#[cfg_attr(feature = "ts", ts(export))]
24562pub struct PARAM_REQUEST_LIST_DATA {
24563    #[doc = "System ID"]
24564    pub target_system: u8,
24565    #[doc = "Component ID"]
24566    pub target_component: u8,
24567}
24568impl PARAM_REQUEST_LIST_DATA {
24569    pub const ENCODED_LEN: usize = 2usize;
24570    pub const DEFAULT: Self = Self {
24571        target_system: 0_u8,
24572        target_component: 0_u8,
24573    };
24574    #[cfg(feature = "arbitrary")]
24575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24576        use arbitrary::{Arbitrary, Unstructured};
24577        let mut buf = [0u8; 1024];
24578        rng.fill_bytes(&mut buf);
24579        let mut unstructured = Unstructured::new(&buf);
24580        Self::arbitrary(&mut unstructured).unwrap_or_default()
24581    }
24582}
24583impl Default for PARAM_REQUEST_LIST_DATA {
24584    fn default() -> Self {
24585        Self::DEFAULT.clone()
24586    }
24587}
24588impl MessageData for PARAM_REQUEST_LIST_DATA {
24589    type Message = MavMessage;
24590    const ID: u32 = 21u32;
24591    const NAME: &'static str = "PARAM_REQUEST_LIST";
24592    const EXTRA_CRC: u8 = 159u8;
24593    const ENCODED_LEN: usize = 2usize;
24594    fn deser(
24595        _version: MavlinkVersion,
24596        __input: &[u8],
24597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24598        let avail_len = __input.len();
24599        let mut payload_buf = [0; Self::ENCODED_LEN];
24600        let mut buf = if avail_len < Self::ENCODED_LEN {
24601            payload_buf[0..avail_len].copy_from_slice(__input);
24602            Bytes::new(&payload_buf)
24603        } else {
24604            Bytes::new(__input)
24605        };
24606        let mut __struct = Self::default();
24607        __struct.target_system = buf.get_u8();
24608        __struct.target_component = buf.get_u8();
24609        Ok(__struct)
24610    }
24611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24612        let mut __tmp = BytesMut::new(bytes);
24613        #[allow(clippy::absurd_extreme_comparisons)]
24614        #[allow(unused_comparisons)]
24615        if __tmp.remaining() < Self::ENCODED_LEN {
24616            panic!(
24617                "buffer is too small (need {} bytes, but got {})",
24618                Self::ENCODED_LEN,
24619                __tmp.remaining(),
24620            )
24621        }
24622        __tmp.put_u8(self.target_system);
24623        __tmp.put_u8(self.target_component);
24624        if matches!(version, MavlinkVersion::V2) {
24625            let len = __tmp.len();
24626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24627        } else {
24628            __tmp.len()
24629        }
24630    }
24631}
24632#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24633#[doc = ""]
24634#[doc = "ID: 20"]
24635#[derive(Debug, Clone, PartialEq)]
24636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24638#[cfg_attr(feature = "ts", derive(TS))]
24639#[cfg_attr(feature = "ts", ts(export))]
24640pub struct PARAM_REQUEST_READ_DATA {
24641    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24642    pub param_index: i16,
24643    #[doc = "System ID"]
24644    pub target_system: u8,
24645    #[doc = "Component ID"]
24646    pub target_component: u8,
24647    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24648    #[cfg_attr(feature = "ts", ts(type = "string"))]
24649    pub param_id: CharArray<16>,
24650}
24651impl PARAM_REQUEST_READ_DATA {
24652    pub const ENCODED_LEN: usize = 20usize;
24653    pub const DEFAULT: Self = Self {
24654        param_index: 0_i16,
24655        target_system: 0_u8,
24656        target_component: 0_u8,
24657        param_id: CharArray::new([0_u8; 16usize]),
24658    };
24659    #[cfg(feature = "arbitrary")]
24660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24661        use arbitrary::{Arbitrary, Unstructured};
24662        let mut buf = [0u8; 1024];
24663        rng.fill_bytes(&mut buf);
24664        let mut unstructured = Unstructured::new(&buf);
24665        Self::arbitrary(&mut unstructured).unwrap_or_default()
24666    }
24667}
24668impl Default for PARAM_REQUEST_READ_DATA {
24669    fn default() -> Self {
24670        Self::DEFAULT.clone()
24671    }
24672}
24673impl MessageData for PARAM_REQUEST_READ_DATA {
24674    type Message = MavMessage;
24675    const ID: u32 = 20u32;
24676    const NAME: &'static str = "PARAM_REQUEST_READ";
24677    const EXTRA_CRC: u8 = 214u8;
24678    const ENCODED_LEN: usize = 20usize;
24679    fn deser(
24680        _version: MavlinkVersion,
24681        __input: &[u8],
24682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24683        let avail_len = __input.len();
24684        let mut payload_buf = [0; Self::ENCODED_LEN];
24685        let mut buf = if avail_len < Self::ENCODED_LEN {
24686            payload_buf[0..avail_len].copy_from_slice(__input);
24687            Bytes::new(&payload_buf)
24688        } else {
24689            Bytes::new(__input)
24690        };
24691        let mut __struct = Self::default();
24692        __struct.param_index = buf.get_i16_le();
24693        __struct.target_system = buf.get_u8();
24694        __struct.target_component = buf.get_u8();
24695        let mut tmp = [0_u8; 16usize];
24696        for v in &mut tmp {
24697            *v = buf.get_u8();
24698        }
24699        __struct.param_id = CharArray::new(tmp);
24700        Ok(__struct)
24701    }
24702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24703        let mut __tmp = BytesMut::new(bytes);
24704        #[allow(clippy::absurd_extreme_comparisons)]
24705        #[allow(unused_comparisons)]
24706        if __tmp.remaining() < Self::ENCODED_LEN {
24707            panic!(
24708                "buffer is too small (need {} bytes, but got {})",
24709                Self::ENCODED_LEN,
24710                __tmp.remaining(),
24711            )
24712        }
24713        __tmp.put_i16_le(self.param_index);
24714        __tmp.put_u8(self.target_system);
24715        __tmp.put_u8(self.target_component);
24716        for val in &self.param_id {
24717            __tmp.put_u8(*val);
24718        }
24719        if matches!(version, MavlinkVersion::V2) {
24720            let len = __tmp.len();
24721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24722        } else {
24723            __tmp.len()
24724        }
24725    }
24726}
24727#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24728#[doc = ""]
24729#[doc = "ID: 23"]
24730#[derive(Debug, Clone, PartialEq)]
24731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24733#[cfg_attr(feature = "ts", derive(TS))]
24734#[cfg_attr(feature = "ts", ts(export))]
24735pub struct PARAM_SET_DATA {
24736    #[doc = "Onboard parameter value"]
24737    pub param_value: f32,
24738    #[doc = "System ID"]
24739    pub target_system: u8,
24740    #[doc = "Component ID"]
24741    pub target_component: u8,
24742    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24743    #[cfg_attr(feature = "ts", ts(type = "string"))]
24744    pub param_id: CharArray<16>,
24745    #[doc = "Onboard parameter type."]
24746    pub param_type: MavParamType,
24747}
24748impl PARAM_SET_DATA {
24749    pub const ENCODED_LEN: usize = 23usize;
24750    pub const DEFAULT: Self = Self {
24751        param_value: 0.0_f32,
24752        target_system: 0_u8,
24753        target_component: 0_u8,
24754        param_id: CharArray::new([0_u8; 16usize]),
24755        param_type: MavParamType::DEFAULT,
24756    };
24757    #[cfg(feature = "arbitrary")]
24758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24759        use arbitrary::{Arbitrary, Unstructured};
24760        let mut buf = [0u8; 1024];
24761        rng.fill_bytes(&mut buf);
24762        let mut unstructured = Unstructured::new(&buf);
24763        Self::arbitrary(&mut unstructured).unwrap_or_default()
24764    }
24765}
24766impl Default for PARAM_SET_DATA {
24767    fn default() -> Self {
24768        Self::DEFAULT.clone()
24769    }
24770}
24771impl MessageData for PARAM_SET_DATA {
24772    type Message = MavMessage;
24773    const ID: u32 = 23u32;
24774    const NAME: &'static str = "PARAM_SET";
24775    const EXTRA_CRC: u8 = 168u8;
24776    const ENCODED_LEN: usize = 23usize;
24777    fn deser(
24778        _version: MavlinkVersion,
24779        __input: &[u8],
24780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24781        let avail_len = __input.len();
24782        let mut payload_buf = [0; Self::ENCODED_LEN];
24783        let mut buf = if avail_len < Self::ENCODED_LEN {
24784            payload_buf[0..avail_len].copy_from_slice(__input);
24785            Bytes::new(&payload_buf)
24786        } else {
24787            Bytes::new(__input)
24788        };
24789        let mut __struct = Self::default();
24790        __struct.param_value = buf.get_f32_le();
24791        __struct.target_system = buf.get_u8();
24792        __struct.target_component = buf.get_u8();
24793        let mut tmp = [0_u8; 16usize];
24794        for v in &mut tmp {
24795            *v = buf.get_u8();
24796        }
24797        __struct.param_id = CharArray::new(tmp);
24798        let tmp = buf.get_u8();
24799        __struct.param_type =
24800            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24801                enum_type: "MavParamType",
24802                value: tmp as u32,
24803            })?;
24804        Ok(__struct)
24805    }
24806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24807        let mut __tmp = BytesMut::new(bytes);
24808        #[allow(clippy::absurd_extreme_comparisons)]
24809        #[allow(unused_comparisons)]
24810        if __tmp.remaining() < Self::ENCODED_LEN {
24811            panic!(
24812                "buffer is too small (need {} bytes, but got {})",
24813                Self::ENCODED_LEN,
24814                __tmp.remaining(),
24815            )
24816        }
24817        __tmp.put_f32_le(self.param_value);
24818        __tmp.put_u8(self.target_system);
24819        __tmp.put_u8(self.target_component);
24820        for val in &self.param_id {
24821            __tmp.put_u8(*val);
24822        }
24823        __tmp.put_u8(self.param_type as u8);
24824        if matches!(version, MavlinkVersion::V2) {
24825            let len = __tmp.len();
24826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24827        } else {
24828            __tmp.len()
24829        }
24830    }
24831}
24832#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24833#[doc = ""]
24834#[doc = "ID: 22"]
24835#[derive(Debug, Clone, PartialEq)]
24836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24838#[cfg_attr(feature = "ts", derive(TS))]
24839#[cfg_attr(feature = "ts", ts(export))]
24840pub struct PARAM_VALUE_DATA {
24841    #[doc = "Onboard parameter value"]
24842    pub param_value: f32,
24843    #[doc = "Total number of onboard parameters"]
24844    pub param_count: u16,
24845    #[doc = "Index of this onboard parameter"]
24846    pub param_index: u16,
24847    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24848    #[cfg_attr(feature = "ts", ts(type = "string"))]
24849    pub param_id: CharArray<16>,
24850    #[doc = "Onboard parameter type."]
24851    pub param_type: MavParamType,
24852}
24853impl PARAM_VALUE_DATA {
24854    pub const ENCODED_LEN: usize = 25usize;
24855    pub const DEFAULT: Self = Self {
24856        param_value: 0.0_f32,
24857        param_count: 0_u16,
24858        param_index: 0_u16,
24859        param_id: CharArray::new([0_u8; 16usize]),
24860        param_type: MavParamType::DEFAULT,
24861    };
24862    #[cfg(feature = "arbitrary")]
24863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24864        use arbitrary::{Arbitrary, Unstructured};
24865        let mut buf = [0u8; 1024];
24866        rng.fill_bytes(&mut buf);
24867        let mut unstructured = Unstructured::new(&buf);
24868        Self::arbitrary(&mut unstructured).unwrap_or_default()
24869    }
24870}
24871impl Default for PARAM_VALUE_DATA {
24872    fn default() -> Self {
24873        Self::DEFAULT.clone()
24874    }
24875}
24876impl MessageData for PARAM_VALUE_DATA {
24877    type Message = MavMessage;
24878    const ID: u32 = 22u32;
24879    const NAME: &'static str = "PARAM_VALUE";
24880    const EXTRA_CRC: u8 = 220u8;
24881    const ENCODED_LEN: usize = 25usize;
24882    fn deser(
24883        _version: MavlinkVersion,
24884        __input: &[u8],
24885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24886        let avail_len = __input.len();
24887        let mut payload_buf = [0; Self::ENCODED_LEN];
24888        let mut buf = if avail_len < Self::ENCODED_LEN {
24889            payload_buf[0..avail_len].copy_from_slice(__input);
24890            Bytes::new(&payload_buf)
24891        } else {
24892            Bytes::new(__input)
24893        };
24894        let mut __struct = Self::default();
24895        __struct.param_value = buf.get_f32_le();
24896        __struct.param_count = buf.get_u16_le();
24897        __struct.param_index = buf.get_u16_le();
24898        let mut tmp = [0_u8; 16usize];
24899        for v in &mut tmp {
24900            *v = buf.get_u8();
24901        }
24902        __struct.param_id = CharArray::new(tmp);
24903        let tmp = buf.get_u8();
24904        __struct.param_type =
24905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24906                enum_type: "MavParamType",
24907                value: tmp as u32,
24908            })?;
24909        Ok(__struct)
24910    }
24911    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24912        let mut __tmp = BytesMut::new(bytes);
24913        #[allow(clippy::absurd_extreme_comparisons)]
24914        #[allow(unused_comparisons)]
24915        if __tmp.remaining() < Self::ENCODED_LEN {
24916            panic!(
24917                "buffer is too small (need {} bytes, but got {})",
24918                Self::ENCODED_LEN,
24919                __tmp.remaining(),
24920            )
24921        }
24922        __tmp.put_f32_le(self.param_value);
24923        __tmp.put_u16_le(self.param_count);
24924        __tmp.put_u16_le(self.param_index);
24925        for val in &self.param_id {
24926            __tmp.put_u8(*val);
24927        }
24928        __tmp.put_u8(self.param_type as u8);
24929        if matches!(version, MavlinkVersion::V2) {
24930            let len = __tmp.len();
24931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24932        } else {
24933            __tmp.len()
24934        }
24935    }
24936}
24937#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24938#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24939#[doc = ""]
24940#[doc = "ID: 4"]
24941#[derive(Debug, Clone, PartialEq)]
24942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24944#[cfg_attr(feature = "ts", derive(TS))]
24945#[cfg_attr(feature = "ts", ts(export))]
24946pub struct PING_DATA {
24947    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24948    pub time_usec: u64,
24949    #[doc = "PING sequence"]
24950    pub seq: u32,
24951    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24952    pub target_system: u8,
24953    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24954    pub target_component: u8,
24955}
24956impl PING_DATA {
24957    pub const ENCODED_LEN: usize = 14usize;
24958    pub const DEFAULT: Self = Self {
24959        time_usec: 0_u64,
24960        seq: 0_u32,
24961        target_system: 0_u8,
24962        target_component: 0_u8,
24963    };
24964    #[cfg(feature = "arbitrary")]
24965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24966        use arbitrary::{Arbitrary, Unstructured};
24967        let mut buf = [0u8; 1024];
24968        rng.fill_bytes(&mut buf);
24969        let mut unstructured = Unstructured::new(&buf);
24970        Self::arbitrary(&mut unstructured).unwrap_or_default()
24971    }
24972}
24973impl Default for PING_DATA {
24974    fn default() -> Self {
24975        Self::DEFAULT.clone()
24976    }
24977}
24978impl MessageData for PING_DATA {
24979    type Message = MavMessage;
24980    const ID: u32 = 4u32;
24981    const NAME: &'static str = "PING";
24982    const EXTRA_CRC: u8 = 237u8;
24983    const ENCODED_LEN: usize = 14usize;
24984    fn deser(
24985        _version: MavlinkVersion,
24986        __input: &[u8],
24987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24988        let avail_len = __input.len();
24989        let mut payload_buf = [0; Self::ENCODED_LEN];
24990        let mut buf = if avail_len < Self::ENCODED_LEN {
24991            payload_buf[0..avail_len].copy_from_slice(__input);
24992            Bytes::new(&payload_buf)
24993        } else {
24994            Bytes::new(__input)
24995        };
24996        let mut __struct = Self::default();
24997        __struct.time_usec = buf.get_u64_le();
24998        __struct.seq = buf.get_u32_le();
24999        __struct.target_system = buf.get_u8();
25000        __struct.target_component = buf.get_u8();
25001        Ok(__struct)
25002    }
25003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25004        let mut __tmp = BytesMut::new(bytes);
25005        #[allow(clippy::absurd_extreme_comparisons)]
25006        #[allow(unused_comparisons)]
25007        if __tmp.remaining() < Self::ENCODED_LEN {
25008            panic!(
25009                "buffer is too small (need {} bytes, but got {})",
25010                Self::ENCODED_LEN,
25011                __tmp.remaining(),
25012            )
25013        }
25014        __tmp.put_u64_le(self.time_usec);
25015        __tmp.put_u32_le(self.seq);
25016        __tmp.put_u8(self.target_system);
25017        __tmp.put_u8(self.target_component);
25018        if matches!(version, MavlinkVersion::V2) {
25019            let len = __tmp.len();
25020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25021        } else {
25022            __tmp.len()
25023        }
25024    }
25025}
25026#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25027#[doc = "Control vehicle tone generation (buzzer)."]
25028#[doc = ""]
25029#[doc = "ID: 258"]
25030#[derive(Debug, Clone, PartialEq)]
25031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25033#[cfg_attr(feature = "ts", derive(TS))]
25034#[cfg_attr(feature = "ts", ts(export))]
25035pub struct PLAY_TUNE_DATA {
25036    #[doc = "System ID"]
25037    pub target_system: u8,
25038    #[doc = "Component ID"]
25039    pub target_component: u8,
25040    #[doc = "tune in board specific format"]
25041    #[cfg_attr(feature = "ts", ts(type = "string"))]
25042    pub tune: CharArray<30>,
25043    #[doc = "tune extension (appended to tune)"]
25044    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25045    #[cfg_attr(feature = "ts", ts(type = "string"))]
25046    pub tune2: CharArray<200>,
25047}
25048impl PLAY_TUNE_DATA {
25049    pub const ENCODED_LEN: usize = 232usize;
25050    pub const DEFAULT: Self = Self {
25051        target_system: 0_u8,
25052        target_component: 0_u8,
25053        tune: CharArray::new([0_u8; 30usize]),
25054        tune2: CharArray::new([0_u8; 200usize]),
25055    };
25056    #[cfg(feature = "arbitrary")]
25057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25058        use arbitrary::{Arbitrary, Unstructured};
25059        let mut buf = [0u8; 1024];
25060        rng.fill_bytes(&mut buf);
25061        let mut unstructured = Unstructured::new(&buf);
25062        Self::arbitrary(&mut unstructured).unwrap_or_default()
25063    }
25064}
25065impl Default for PLAY_TUNE_DATA {
25066    fn default() -> Self {
25067        Self::DEFAULT.clone()
25068    }
25069}
25070impl MessageData for PLAY_TUNE_DATA {
25071    type Message = MavMessage;
25072    const ID: u32 = 258u32;
25073    const NAME: &'static str = "PLAY_TUNE";
25074    const EXTRA_CRC: u8 = 187u8;
25075    const ENCODED_LEN: usize = 232usize;
25076    fn deser(
25077        _version: MavlinkVersion,
25078        __input: &[u8],
25079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25080        let avail_len = __input.len();
25081        let mut payload_buf = [0; Self::ENCODED_LEN];
25082        let mut buf = if avail_len < Self::ENCODED_LEN {
25083            payload_buf[0..avail_len].copy_from_slice(__input);
25084            Bytes::new(&payload_buf)
25085        } else {
25086            Bytes::new(__input)
25087        };
25088        let mut __struct = Self::default();
25089        __struct.target_system = buf.get_u8();
25090        __struct.target_component = buf.get_u8();
25091        let mut tmp = [0_u8; 30usize];
25092        for v in &mut tmp {
25093            *v = buf.get_u8();
25094        }
25095        __struct.tune = CharArray::new(tmp);
25096        let mut tmp = [0_u8; 200usize];
25097        for v in &mut tmp {
25098            *v = buf.get_u8();
25099        }
25100        __struct.tune2 = CharArray::new(tmp);
25101        Ok(__struct)
25102    }
25103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25104        let mut __tmp = BytesMut::new(bytes);
25105        #[allow(clippy::absurd_extreme_comparisons)]
25106        #[allow(unused_comparisons)]
25107        if __tmp.remaining() < Self::ENCODED_LEN {
25108            panic!(
25109                "buffer is too small (need {} bytes, but got {})",
25110                Self::ENCODED_LEN,
25111                __tmp.remaining(),
25112            )
25113        }
25114        __tmp.put_u8(self.target_system);
25115        __tmp.put_u8(self.target_component);
25116        for val in &self.tune {
25117            __tmp.put_u8(*val);
25118        }
25119        if matches!(version, MavlinkVersion::V2) {
25120            for val in &self.tune2 {
25121                __tmp.put_u8(*val);
25122            }
25123            let len = __tmp.len();
25124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25125        } else {
25126            __tmp.len()
25127        }
25128    }
25129}
25130#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25131#[doc = ""]
25132#[doc = "ID: 400"]
25133#[derive(Debug, Clone, PartialEq)]
25134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25136#[cfg_attr(feature = "ts", derive(TS))]
25137#[cfg_attr(feature = "ts", ts(export))]
25138pub struct PLAY_TUNE_V2_DATA {
25139    #[doc = "Tune format"]
25140    pub format: TuneFormat,
25141    #[doc = "System ID"]
25142    pub target_system: u8,
25143    #[doc = "Component ID"]
25144    pub target_component: u8,
25145    #[doc = "Tune definition as a NULL-terminated string."]
25146    #[cfg_attr(feature = "ts", ts(type = "string"))]
25147    pub tune: CharArray<248>,
25148}
25149impl PLAY_TUNE_V2_DATA {
25150    pub const ENCODED_LEN: usize = 254usize;
25151    pub const DEFAULT: Self = Self {
25152        format: TuneFormat::DEFAULT,
25153        target_system: 0_u8,
25154        target_component: 0_u8,
25155        tune: CharArray::new([0_u8; 248usize]),
25156    };
25157    #[cfg(feature = "arbitrary")]
25158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25159        use arbitrary::{Arbitrary, Unstructured};
25160        let mut buf = [0u8; 1024];
25161        rng.fill_bytes(&mut buf);
25162        let mut unstructured = Unstructured::new(&buf);
25163        Self::arbitrary(&mut unstructured).unwrap_or_default()
25164    }
25165}
25166impl Default for PLAY_TUNE_V2_DATA {
25167    fn default() -> Self {
25168        Self::DEFAULT.clone()
25169    }
25170}
25171impl MessageData for PLAY_TUNE_V2_DATA {
25172    type Message = MavMessage;
25173    const ID: u32 = 400u32;
25174    const NAME: &'static str = "PLAY_TUNE_V2";
25175    const EXTRA_CRC: u8 = 110u8;
25176    const ENCODED_LEN: usize = 254usize;
25177    fn deser(
25178        _version: MavlinkVersion,
25179        __input: &[u8],
25180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25181        let avail_len = __input.len();
25182        let mut payload_buf = [0; Self::ENCODED_LEN];
25183        let mut buf = if avail_len < Self::ENCODED_LEN {
25184            payload_buf[0..avail_len].copy_from_slice(__input);
25185            Bytes::new(&payload_buf)
25186        } else {
25187            Bytes::new(__input)
25188        };
25189        let mut __struct = Self::default();
25190        let tmp = buf.get_u32_le();
25191        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25192            ::mavlink_core::error::ParserError::InvalidEnum {
25193                enum_type: "TuneFormat",
25194                value: tmp as u32,
25195            },
25196        )?;
25197        __struct.target_system = buf.get_u8();
25198        __struct.target_component = buf.get_u8();
25199        let mut tmp = [0_u8; 248usize];
25200        for v in &mut tmp {
25201            *v = buf.get_u8();
25202        }
25203        __struct.tune = CharArray::new(tmp);
25204        Ok(__struct)
25205    }
25206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25207        let mut __tmp = BytesMut::new(bytes);
25208        #[allow(clippy::absurd_extreme_comparisons)]
25209        #[allow(unused_comparisons)]
25210        if __tmp.remaining() < Self::ENCODED_LEN {
25211            panic!(
25212                "buffer is too small (need {} bytes, but got {})",
25213                Self::ENCODED_LEN,
25214                __tmp.remaining(),
25215            )
25216        }
25217        __tmp.put_u32_le(self.format as u32);
25218        __tmp.put_u8(self.target_system);
25219        __tmp.put_u8(self.target_component);
25220        for val in &self.tune {
25221            __tmp.put_u8(*val);
25222        }
25223        if matches!(version, MavlinkVersion::V2) {
25224            let len = __tmp.len();
25225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25226        } else {
25227            __tmp.len()
25228        }
25229    }
25230}
25231#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25232#[doc = ""]
25233#[doc = "ID: 87"]
25234#[derive(Debug, Clone, PartialEq)]
25235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25237#[cfg_attr(feature = "ts", derive(TS))]
25238#[cfg_attr(feature = "ts", ts(export))]
25239pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25240    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25241    pub time_boot_ms: u32,
25242    #[doc = "Latitude in WGS84 frame"]
25243    pub lat_int: i32,
25244    #[doc = "Longitude in WGS84 frame"]
25245    pub lon_int: i32,
25246    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25247    pub alt: f32,
25248    #[doc = "X velocity in NED frame"]
25249    pub vx: f32,
25250    #[doc = "Y velocity in NED frame"]
25251    pub vy: f32,
25252    #[doc = "Z velocity in NED frame"]
25253    pub vz: f32,
25254    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25255    pub afx: f32,
25256    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25257    pub afy: f32,
25258    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25259    pub afz: f32,
25260    #[doc = "yaw setpoint"]
25261    pub yaw: f32,
25262    #[doc = "yaw rate setpoint"]
25263    pub yaw_rate: f32,
25264    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25265    pub type_mask: PositionTargetTypemask,
25266    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25267    pub coordinate_frame: MavFrame,
25268}
25269impl POSITION_TARGET_GLOBAL_INT_DATA {
25270    pub const ENCODED_LEN: usize = 51usize;
25271    pub const DEFAULT: Self = Self {
25272        time_boot_ms: 0_u32,
25273        lat_int: 0_i32,
25274        lon_int: 0_i32,
25275        alt: 0.0_f32,
25276        vx: 0.0_f32,
25277        vy: 0.0_f32,
25278        vz: 0.0_f32,
25279        afx: 0.0_f32,
25280        afy: 0.0_f32,
25281        afz: 0.0_f32,
25282        yaw: 0.0_f32,
25283        yaw_rate: 0.0_f32,
25284        type_mask: PositionTargetTypemask::DEFAULT,
25285        coordinate_frame: MavFrame::DEFAULT,
25286    };
25287    #[cfg(feature = "arbitrary")]
25288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25289        use arbitrary::{Arbitrary, Unstructured};
25290        let mut buf = [0u8; 1024];
25291        rng.fill_bytes(&mut buf);
25292        let mut unstructured = Unstructured::new(&buf);
25293        Self::arbitrary(&mut unstructured).unwrap_or_default()
25294    }
25295}
25296impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25297    fn default() -> Self {
25298        Self::DEFAULT.clone()
25299    }
25300}
25301impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25302    type Message = MavMessage;
25303    const ID: u32 = 87u32;
25304    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25305    const EXTRA_CRC: u8 = 150u8;
25306    const ENCODED_LEN: usize = 51usize;
25307    fn deser(
25308        _version: MavlinkVersion,
25309        __input: &[u8],
25310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25311        let avail_len = __input.len();
25312        let mut payload_buf = [0; Self::ENCODED_LEN];
25313        let mut buf = if avail_len < Self::ENCODED_LEN {
25314            payload_buf[0..avail_len].copy_from_slice(__input);
25315            Bytes::new(&payload_buf)
25316        } else {
25317            Bytes::new(__input)
25318        };
25319        let mut __struct = Self::default();
25320        __struct.time_boot_ms = buf.get_u32_le();
25321        __struct.lat_int = buf.get_i32_le();
25322        __struct.lon_int = buf.get_i32_le();
25323        __struct.alt = buf.get_f32_le();
25324        __struct.vx = buf.get_f32_le();
25325        __struct.vy = buf.get_f32_le();
25326        __struct.vz = buf.get_f32_le();
25327        __struct.afx = buf.get_f32_le();
25328        __struct.afy = buf.get_f32_le();
25329        __struct.afz = buf.get_f32_le();
25330        __struct.yaw = buf.get_f32_le();
25331        __struct.yaw_rate = buf.get_f32_le();
25332        let tmp = buf.get_u16_le();
25333        __struct.type_mask = PositionTargetTypemask::from_bits(
25334            tmp & PositionTargetTypemask::all().bits(),
25335        )
25336        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25337            flag_type: "PositionTargetTypemask",
25338            value: tmp as u32,
25339        })?;
25340        let tmp = buf.get_u8();
25341        __struct.coordinate_frame =
25342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25343                enum_type: "MavFrame",
25344                value: tmp as u32,
25345            })?;
25346        Ok(__struct)
25347    }
25348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25349        let mut __tmp = BytesMut::new(bytes);
25350        #[allow(clippy::absurd_extreme_comparisons)]
25351        #[allow(unused_comparisons)]
25352        if __tmp.remaining() < Self::ENCODED_LEN {
25353            panic!(
25354                "buffer is too small (need {} bytes, but got {})",
25355                Self::ENCODED_LEN,
25356                __tmp.remaining(),
25357            )
25358        }
25359        __tmp.put_u32_le(self.time_boot_ms);
25360        __tmp.put_i32_le(self.lat_int);
25361        __tmp.put_i32_le(self.lon_int);
25362        __tmp.put_f32_le(self.alt);
25363        __tmp.put_f32_le(self.vx);
25364        __tmp.put_f32_le(self.vy);
25365        __tmp.put_f32_le(self.vz);
25366        __tmp.put_f32_le(self.afx);
25367        __tmp.put_f32_le(self.afy);
25368        __tmp.put_f32_le(self.afz);
25369        __tmp.put_f32_le(self.yaw);
25370        __tmp.put_f32_le(self.yaw_rate);
25371        __tmp.put_u16_le(self.type_mask.bits());
25372        __tmp.put_u8(self.coordinate_frame as u8);
25373        if matches!(version, MavlinkVersion::V2) {
25374            let len = __tmp.len();
25375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25376        } else {
25377            __tmp.len()
25378        }
25379    }
25380}
25381#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25382#[doc = ""]
25383#[doc = "ID: 85"]
25384#[derive(Debug, Clone, PartialEq)]
25385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25387#[cfg_attr(feature = "ts", derive(TS))]
25388#[cfg_attr(feature = "ts", ts(export))]
25389pub struct POSITION_TARGET_LOCAL_NED_DATA {
25390    #[doc = "Timestamp (time since system boot)."]
25391    pub time_boot_ms: u32,
25392    #[doc = "X Position in NED frame"]
25393    pub x: f32,
25394    #[doc = "Y Position in NED frame"]
25395    pub y: f32,
25396    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25397    pub z: f32,
25398    #[doc = "X velocity in NED frame"]
25399    pub vx: f32,
25400    #[doc = "Y velocity in NED frame"]
25401    pub vy: f32,
25402    #[doc = "Z velocity in NED frame"]
25403    pub vz: f32,
25404    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25405    pub afx: f32,
25406    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25407    pub afy: f32,
25408    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25409    pub afz: f32,
25410    #[doc = "yaw setpoint"]
25411    pub yaw: f32,
25412    #[doc = "yaw rate setpoint"]
25413    pub yaw_rate: f32,
25414    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25415    pub type_mask: PositionTargetTypemask,
25416    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25417    pub coordinate_frame: MavFrame,
25418}
25419impl POSITION_TARGET_LOCAL_NED_DATA {
25420    pub const ENCODED_LEN: usize = 51usize;
25421    pub const DEFAULT: Self = Self {
25422        time_boot_ms: 0_u32,
25423        x: 0.0_f32,
25424        y: 0.0_f32,
25425        z: 0.0_f32,
25426        vx: 0.0_f32,
25427        vy: 0.0_f32,
25428        vz: 0.0_f32,
25429        afx: 0.0_f32,
25430        afy: 0.0_f32,
25431        afz: 0.0_f32,
25432        yaw: 0.0_f32,
25433        yaw_rate: 0.0_f32,
25434        type_mask: PositionTargetTypemask::DEFAULT,
25435        coordinate_frame: MavFrame::DEFAULT,
25436    };
25437    #[cfg(feature = "arbitrary")]
25438    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25439        use arbitrary::{Arbitrary, Unstructured};
25440        let mut buf = [0u8; 1024];
25441        rng.fill_bytes(&mut buf);
25442        let mut unstructured = Unstructured::new(&buf);
25443        Self::arbitrary(&mut unstructured).unwrap_or_default()
25444    }
25445}
25446impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25447    fn default() -> Self {
25448        Self::DEFAULT.clone()
25449    }
25450}
25451impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25452    type Message = MavMessage;
25453    const ID: u32 = 85u32;
25454    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25455    const EXTRA_CRC: u8 = 140u8;
25456    const ENCODED_LEN: usize = 51usize;
25457    fn deser(
25458        _version: MavlinkVersion,
25459        __input: &[u8],
25460    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25461        let avail_len = __input.len();
25462        let mut payload_buf = [0; Self::ENCODED_LEN];
25463        let mut buf = if avail_len < Self::ENCODED_LEN {
25464            payload_buf[0..avail_len].copy_from_slice(__input);
25465            Bytes::new(&payload_buf)
25466        } else {
25467            Bytes::new(__input)
25468        };
25469        let mut __struct = Self::default();
25470        __struct.time_boot_ms = buf.get_u32_le();
25471        __struct.x = buf.get_f32_le();
25472        __struct.y = buf.get_f32_le();
25473        __struct.z = buf.get_f32_le();
25474        __struct.vx = buf.get_f32_le();
25475        __struct.vy = buf.get_f32_le();
25476        __struct.vz = buf.get_f32_le();
25477        __struct.afx = buf.get_f32_le();
25478        __struct.afy = buf.get_f32_le();
25479        __struct.afz = buf.get_f32_le();
25480        __struct.yaw = buf.get_f32_le();
25481        __struct.yaw_rate = buf.get_f32_le();
25482        let tmp = buf.get_u16_le();
25483        __struct.type_mask = PositionTargetTypemask::from_bits(
25484            tmp & PositionTargetTypemask::all().bits(),
25485        )
25486        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25487            flag_type: "PositionTargetTypemask",
25488            value: tmp as u32,
25489        })?;
25490        let tmp = buf.get_u8();
25491        __struct.coordinate_frame =
25492            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25493                enum_type: "MavFrame",
25494                value: tmp as u32,
25495            })?;
25496        Ok(__struct)
25497    }
25498    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25499        let mut __tmp = BytesMut::new(bytes);
25500        #[allow(clippy::absurd_extreme_comparisons)]
25501        #[allow(unused_comparisons)]
25502        if __tmp.remaining() < Self::ENCODED_LEN {
25503            panic!(
25504                "buffer is too small (need {} bytes, but got {})",
25505                Self::ENCODED_LEN,
25506                __tmp.remaining(),
25507            )
25508        }
25509        __tmp.put_u32_le(self.time_boot_ms);
25510        __tmp.put_f32_le(self.x);
25511        __tmp.put_f32_le(self.y);
25512        __tmp.put_f32_le(self.z);
25513        __tmp.put_f32_le(self.vx);
25514        __tmp.put_f32_le(self.vy);
25515        __tmp.put_f32_le(self.vz);
25516        __tmp.put_f32_le(self.afx);
25517        __tmp.put_f32_le(self.afy);
25518        __tmp.put_f32_le(self.afz);
25519        __tmp.put_f32_le(self.yaw);
25520        __tmp.put_f32_le(self.yaw_rate);
25521        __tmp.put_u16_le(self.type_mask.bits());
25522        __tmp.put_u8(self.coordinate_frame as u8);
25523        if matches!(version, MavlinkVersion::V2) {
25524            let len = __tmp.len();
25525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25526        } else {
25527            __tmp.len()
25528        }
25529    }
25530}
25531#[doc = "Power supply status."]
25532#[doc = ""]
25533#[doc = "ID: 125"]
25534#[derive(Debug, Clone, PartialEq)]
25535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25537#[cfg_attr(feature = "ts", derive(TS))]
25538#[cfg_attr(feature = "ts", ts(export))]
25539pub struct POWER_STATUS_DATA {
25540    #[doc = "5V rail voltage."]
25541    pub Vcc: u16,
25542    #[doc = "Servo rail voltage."]
25543    pub Vservo: u16,
25544    #[doc = "Bitmap of power supply status flags."]
25545    pub flags: MavPowerStatus,
25546}
25547impl POWER_STATUS_DATA {
25548    pub const ENCODED_LEN: usize = 6usize;
25549    pub const DEFAULT: Self = Self {
25550        Vcc: 0_u16,
25551        Vservo: 0_u16,
25552        flags: MavPowerStatus::DEFAULT,
25553    };
25554    #[cfg(feature = "arbitrary")]
25555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25556        use arbitrary::{Arbitrary, Unstructured};
25557        let mut buf = [0u8; 1024];
25558        rng.fill_bytes(&mut buf);
25559        let mut unstructured = Unstructured::new(&buf);
25560        Self::arbitrary(&mut unstructured).unwrap_or_default()
25561    }
25562}
25563impl Default for POWER_STATUS_DATA {
25564    fn default() -> Self {
25565        Self::DEFAULT.clone()
25566    }
25567}
25568impl MessageData for POWER_STATUS_DATA {
25569    type Message = MavMessage;
25570    const ID: u32 = 125u32;
25571    const NAME: &'static str = "POWER_STATUS";
25572    const EXTRA_CRC: u8 = 203u8;
25573    const ENCODED_LEN: usize = 6usize;
25574    fn deser(
25575        _version: MavlinkVersion,
25576        __input: &[u8],
25577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25578        let avail_len = __input.len();
25579        let mut payload_buf = [0; Self::ENCODED_LEN];
25580        let mut buf = if avail_len < Self::ENCODED_LEN {
25581            payload_buf[0..avail_len].copy_from_slice(__input);
25582            Bytes::new(&payload_buf)
25583        } else {
25584            Bytes::new(__input)
25585        };
25586        let mut __struct = Self::default();
25587        __struct.Vcc = buf.get_u16_le();
25588        __struct.Vservo = buf.get_u16_le();
25589        let tmp = buf.get_u16_le();
25590        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25591            ::mavlink_core::error::ParserError::InvalidFlag {
25592                flag_type: "MavPowerStatus",
25593                value: tmp as u32,
25594            },
25595        )?;
25596        Ok(__struct)
25597    }
25598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25599        let mut __tmp = BytesMut::new(bytes);
25600        #[allow(clippy::absurd_extreme_comparisons)]
25601        #[allow(unused_comparisons)]
25602        if __tmp.remaining() < Self::ENCODED_LEN {
25603            panic!(
25604                "buffer is too small (need {} bytes, but got {})",
25605                Self::ENCODED_LEN,
25606                __tmp.remaining(),
25607            )
25608        }
25609        __tmp.put_u16_le(self.Vcc);
25610        __tmp.put_u16_le(self.Vservo);
25611        __tmp.put_u16_le(self.flags.bits());
25612        if matches!(version, MavlinkVersion::V2) {
25613            let len = __tmp.len();
25614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25615        } else {
25616            __tmp.len()
25617        }
25618    }
25619}
25620#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25621#[doc = ""]
25622#[doc = "ID: 300"]
25623#[derive(Debug, Clone, PartialEq)]
25624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25626#[cfg_attr(feature = "ts", derive(TS))]
25627#[cfg_attr(feature = "ts", ts(export))]
25628pub struct PROTOCOL_VERSION_DATA {
25629    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25630    pub version: u16,
25631    #[doc = "Minimum MAVLink version supported"]
25632    pub min_version: u16,
25633    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25634    pub max_version: u16,
25635    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25637    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25638    pub spec_version_hash: [u8; 8],
25639    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25641    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25642    pub library_version_hash: [u8; 8],
25643}
25644impl PROTOCOL_VERSION_DATA {
25645    pub const ENCODED_LEN: usize = 22usize;
25646    pub const DEFAULT: Self = Self {
25647        version: 0_u16,
25648        min_version: 0_u16,
25649        max_version: 0_u16,
25650        spec_version_hash: [0_u8; 8usize],
25651        library_version_hash: [0_u8; 8usize],
25652    };
25653    #[cfg(feature = "arbitrary")]
25654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25655        use arbitrary::{Arbitrary, Unstructured};
25656        let mut buf = [0u8; 1024];
25657        rng.fill_bytes(&mut buf);
25658        let mut unstructured = Unstructured::new(&buf);
25659        Self::arbitrary(&mut unstructured).unwrap_or_default()
25660    }
25661}
25662impl Default for PROTOCOL_VERSION_DATA {
25663    fn default() -> Self {
25664        Self::DEFAULT.clone()
25665    }
25666}
25667impl MessageData for PROTOCOL_VERSION_DATA {
25668    type Message = MavMessage;
25669    const ID: u32 = 300u32;
25670    const NAME: &'static str = "PROTOCOL_VERSION";
25671    const EXTRA_CRC: u8 = 217u8;
25672    const ENCODED_LEN: usize = 22usize;
25673    fn deser(
25674        _version: MavlinkVersion,
25675        __input: &[u8],
25676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25677        let avail_len = __input.len();
25678        let mut payload_buf = [0; Self::ENCODED_LEN];
25679        let mut buf = if avail_len < Self::ENCODED_LEN {
25680            payload_buf[0..avail_len].copy_from_slice(__input);
25681            Bytes::new(&payload_buf)
25682        } else {
25683            Bytes::new(__input)
25684        };
25685        let mut __struct = Self::default();
25686        __struct.version = buf.get_u16_le();
25687        __struct.min_version = buf.get_u16_le();
25688        __struct.max_version = buf.get_u16_le();
25689        for v in &mut __struct.spec_version_hash {
25690            let val = buf.get_u8();
25691            *v = val;
25692        }
25693        for v in &mut __struct.library_version_hash {
25694            let val = buf.get_u8();
25695            *v = val;
25696        }
25697        Ok(__struct)
25698    }
25699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25700        let mut __tmp = BytesMut::new(bytes);
25701        #[allow(clippy::absurd_extreme_comparisons)]
25702        #[allow(unused_comparisons)]
25703        if __tmp.remaining() < Self::ENCODED_LEN {
25704            panic!(
25705                "buffer is too small (need {} bytes, but got {})",
25706                Self::ENCODED_LEN,
25707                __tmp.remaining(),
25708            )
25709        }
25710        __tmp.put_u16_le(self.version);
25711        __tmp.put_u16_le(self.min_version);
25712        __tmp.put_u16_le(self.max_version);
25713        for val in &self.spec_version_hash {
25714            __tmp.put_u8(*val);
25715        }
25716        for val in &self.library_version_hash {
25717            __tmp.put_u8(*val);
25718        }
25719        if matches!(version, MavlinkVersion::V2) {
25720            let len = __tmp.len();
25721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25722        } else {
25723            __tmp.len()
25724        }
25725    }
25726}
25727#[doc = "Status generated by radio and injected into MAVLink stream."]
25728#[doc = ""]
25729#[doc = "ID: 109"]
25730#[derive(Debug, Clone, PartialEq)]
25731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25733#[cfg_attr(feature = "ts", derive(TS))]
25734#[cfg_attr(feature = "ts", ts(export))]
25735pub struct RADIO_STATUS_DATA {
25736    #[doc = "Count of radio packet receive errors (since boot)."]
25737    pub rxerrors: u16,
25738    #[doc = "Count of error corrected radio packets (since boot)."]
25739    pub fixed: u16,
25740    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25741    pub rssi: u8,
25742    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25743    pub remrssi: u8,
25744    #[doc = "Remaining free transmitter buffer space."]
25745    pub txbuf: u8,
25746    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25747    pub noise: u8,
25748    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25749    pub remnoise: u8,
25750}
25751impl RADIO_STATUS_DATA {
25752    pub const ENCODED_LEN: usize = 9usize;
25753    pub const DEFAULT: Self = Self {
25754        rxerrors: 0_u16,
25755        fixed: 0_u16,
25756        rssi: 0_u8,
25757        remrssi: 0_u8,
25758        txbuf: 0_u8,
25759        noise: 0_u8,
25760        remnoise: 0_u8,
25761    };
25762    #[cfg(feature = "arbitrary")]
25763    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25764        use arbitrary::{Arbitrary, Unstructured};
25765        let mut buf = [0u8; 1024];
25766        rng.fill_bytes(&mut buf);
25767        let mut unstructured = Unstructured::new(&buf);
25768        Self::arbitrary(&mut unstructured).unwrap_or_default()
25769    }
25770}
25771impl Default for RADIO_STATUS_DATA {
25772    fn default() -> Self {
25773        Self::DEFAULT.clone()
25774    }
25775}
25776impl MessageData for RADIO_STATUS_DATA {
25777    type Message = MavMessage;
25778    const ID: u32 = 109u32;
25779    const NAME: &'static str = "RADIO_STATUS";
25780    const EXTRA_CRC: u8 = 185u8;
25781    const ENCODED_LEN: usize = 9usize;
25782    fn deser(
25783        _version: MavlinkVersion,
25784        __input: &[u8],
25785    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25786        let avail_len = __input.len();
25787        let mut payload_buf = [0; Self::ENCODED_LEN];
25788        let mut buf = if avail_len < Self::ENCODED_LEN {
25789            payload_buf[0..avail_len].copy_from_slice(__input);
25790            Bytes::new(&payload_buf)
25791        } else {
25792            Bytes::new(__input)
25793        };
25794        let mut __struct = Self::default();
25795        __struct.rxerrors = buf.get_u16_le();
25796        __struct.fixed = buf.get_u16_le();
25797        __struct.rssi = buf.get_u8();
25798        __struct.remrssi = buf.get_u8();
25799        __struct.txbuf = buf.get_u8();
25800        __struct.noise = buf.get_u8();
25801        __struct.remnoise = buf.get_u8();
25802        Ok(__struct)
25803    }
25804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25805        let mut __tmp = BytesMut::new(bytes);
25806        #[allow(clippy::absurd_extreme_comparisons)]
25807        #[allow(unused_comparisons)]
25808        if __tmp.remaining() < Self::ENCODED_LEN {
25809            panic!(
25810                "buffer is too small (need {} bytes, but got {})",
25811                Self::ENCODED_LEN,
25812                __tmp.remaining(),
25813            )
25814        }
25815        __tmp.put_u16_le(self.rxerrors);
25816        __tmp.put_u16_le(self.fixed);
25817        __tmp.put_u8(self.rssi);
25818        __tmp.put_u8(self.remrssi);
25819        __tmp.put_u8(self.txbuf);
25820        __tmp.put_u8(self.noise);
25821        __tmp.put_u8(self.remnoise);
25822        if matches!(version, MavlinkVersion::V2) {
25823            let len = __tmp.len();
25824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25825        } else {
25826            __tmp.len()
25827        }
25828    }
25829}
25830#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25831#[doc = ""]
25832#[doc = "ID: 27"]
25833#[derive(Debug, Clone, PartialEq)]
25834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25836#[cfg_attr(feature = "ts", derive(TS))]
25837#[cfg_attr(feature = "ts", ts(export))]
25838pub struct RAW_IMU_DATA {
25839    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25840    pub time_usec: u64,
25841    #[doc = "X acceleration (raw)"]
25842    pub xacc: i16,
25843    #[doc = "Y acceleration (raw)"]
25844    pub yacc: i16,
25845    #[doc = "Z acceleration (raw)"]
25846    pub zacc: i16,
25847    #[doc = "Angular speed around X axis (raw)"]
25848    pub xgyro: i16,
25849    #[doc = "Angular speed around Y axis (raw)"]
25850    pub ygyro: i16,
25851    #[doc = "Angular speed around Z axis (raw)"]
25852    pub zgyro: i16,
25853    #[doc = "X Magnetic field (raw)"]
25854    pub xmag: i16,
25855    #[doc = "Y Magnetic field (raw)"]
25856    pub ymag: i16,
25857    #[doc = "Z Magnetic field (raw)"]
25858    pub zmag: i16,
25859    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25860    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25861    pub id: u8,
25862    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25863    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25864    pub temperature: i16,
25865}
25866impl RAW_IMU_DATA {
25867    pub const ENCODED_LEN: usize = 29usize;
25868    pub const DEFAULT: Self = Self {
25869        time_usec: 0_u64,
25870        xacc: 0_i16,
25871        yacc: 0_i16,
25872        zacc: 0_i16,
25873        xgyro: 0_i16,
25874        ygyro: 0_i16,
25875        zgyro: 0_i16,
25876        xmag: 0_i16,
25877        ymag: 0_i16,
25878        zmag: 0_i16,
25879        id: 0_u8,
25880        temperature: 0_i16,
25881    };
25882    #[cfg(feature = "arbitrary")]
25883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25884        use arbitrary::{Arbitrary, Unstructured};
25885        let mut buf = [0u8; 1024];
25886        rng.fill_bytes(&mut buf);
25887        let mut unstructured = Unstructured::new(&buf);
25888        Self::arbitrary(&mut unstructured).unwrap_or_default()
25889    }
25890}
25891impl Default for RAW_IMU_DATA {
25892    fn default() -> Self {
25893        Self::DEFAULT.clone()
25894    }
25895}
25896impl MessageData for RAW_IMU_DATA {
25897    type Message = MavMessage;
25898    const ID: u32 = 27u32;
25899    const NAME: &'static str = "RAW_IMU";
25900    const EXTRA_CRC: u8 = 144u8;
25901    const ENCODED_LEN: usize = 29usize;
25902    fn deser(
25903        _version: MavlinkVersion,
25904        __input: &[u8],
25905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25906        let avail_len = __input.len();
25907        let mut payload_buf = [0; Self::ENCODED_LEN];
25908        let mut buf = if avail_len < Self::ENCODED_LEN {
25909            payload_buf[0..avail_len].copy_from_slice(__input);
25910            Bytes::new(&payload_buf)
25911        } else {
25912            Bytes::new(__input)
25913        };
25914        let mut __struct = Self::default();
25915        __struct.time_usec = buf.get_u64_le();
25916        __struct.xacc = buf.get_i16_le();
25917        __struct.yacc = buf.get_i16_le();
25918        __struct.zacc = buf.get_i16_le();
25919        __struct.xgyro = buf.get_i16_le();
25920        __struct.ygyro = buf.get_i16_le();
25921        __struct.zgyro = buf.get_i16_le();
25922        __struct.xmag = buf.get_i16_le();
25923        __struct.ymag = buf.get_i16_le();
25924        __struct.zmag = buf.get_i16_le();
25925        __struct.id = buf.get_u8();
25926        __struct.temperature = buf.get_i16_le();
25927        Ok(__struct)
25928    }
25929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25930        let mut __tmp = BytesMut::new(bytes);
25931        #[allow(clippy::absurd_extreme_comparisons)]
25932        #[allow(unused_comparisons)]
25933        if __tmp.remaining() < Self::ENCODED_LEN {
25934            panic!(
25935                "buffer is too small (need {} bytes, but got {})",
25936                Self::ENCODED_LEN,
25937                __tmp.remaining(),
25938            )
25939        }
25940        __tmp.put_u64_le(self.time_usec);
25941        __tmp.put_i16_le(self.xacc);
25942        __tmp.put_i16_le(self.yacc);
25943        __tmp.put_i16_le(self.zacc);
25944        __tmp.put_i16_le(self.xgyro);
25945        __tmp.put_i16_le(self.ygyro);
25946        __tmp.put_i16_le(self.zgyro);
25947        __tmp.put_i16_le(self.xmag);
25948        __tmp.put_i16_le(self.ymag);
25949        __tmp.put_i16_le(self.zmag);
25950        if matches!(version, MavlinkVersion::V2) {
25951            __tmp.put_u8(self.id);
25952            __tmp.put_i16_le(self.temperature);
25953            let len = __tmp.len();
25954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25955        } else {
25956            __tmp.len()
25957        }
25958    }
25959}
25960#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25961#[doc = ""]
25962#[doc = "ID: 28"]
25963#[derive(Debug, Clone, PartialEq)]
25964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25966#[cfg_attr(feature = "ts", derive(TS))]
25967#[cfg_attr(feature = "ts", ts(export))]
25968pub struct RAW_PRESSURE_DATA {
25969    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25970    pub time_usec: u64,
25971    #[doc = "Absolute pressure (raw)"]
25972    pub press_abs: i16,
25973    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25974    pub press_diff1: i16,
25975    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25976    pub press_diff2: i16,
25977    #[doc = "Raw Temperature measurement (raw)"]
25978    pub temperature: i16,
25979}
25980impl RAW_PRESSURE_DATA {
25981    pub const ENCODED_LEN: usize = 16usize;
25982    pub const DEFAULT: Self = Self {
25983        time_usec: 0_u64,
25984        press_abs: 0_i16,
25985        press_diff1: 0_i16,
25986        press_diff2: 0_i16,
25987        temperature: 0_i16,
25988    };
25989    #[cfg(feature = "arbitrary")]
25990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25991        use arbitrary::{Arbitrary, Unstructured};
25992        let mut buf = [0u8; 1024];
25993        rng.fill_bytes(&mut buf);
25994        let mut unstructured = Unstructured::new(&buf);
25995        Self::arbitrary(&mut unstructured).unwrap_or_default()
25996    }
25997}
25998impl Default for RAW_PRESSURE_DATA {
25999    fn default() -> Self {
26000        Self::DEFAULT.clone()
26001    }
26002}
26003impl MessageData for RAW_PRESSURE_DATA {
26004    type Message = MavMessage;
26005    const ID: u32 = 28u32;
26006    const NAME: &'static str = "RAW_PRESSURE";
26007    const EXTRA_CRC: u8 = 67u8;
26008    const ENCODED_LEN: usize = 16usize;
26009    fn deser(
26010        _version: MavlinkVersion,
26011        __input: &[u8],
26012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26013        let avail_len = __input.len();
26014        let mut payload_buf = [0; Self::ENCODED_LEN];
26015        let mut buf = if avail_len < Self::ENCODED_LEN {
26016            payload_buf[0..avail_len].copy_from_slice(__input);
26017            Bytes::new(&payload_buf)
26018        } else {
26019            Bytes::new(__input)
26020        };
26021        let mut __struct = Self::default();
26022        __struct.time_usec = buf.get_u64_le();
26023        __struct.press_abs = buf.get_i16_le();
26024        __struct.press_diff1 = buf.get_i16_le();
26025        __struct.press_diff2 = buf.get_i16_le();
26026        __struct.temperature = buf.get_i16_le();
26027        Ok(__struct)
26028    }
26029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26030        let mut __tmp = BytesMut::new(bytes);
26031        #[allow(clippy::absurd_extreme_comparisons)]
26032        #[allow(unused_comparisons)]
26033        if __tmp.remaining() < Self::ENCODED_LEN {
26034            panic!(
26035                "buffer is too small (need {} bytes, but got {})",
26036                Self::ENCODED_LEN,
26037                __tmp.remaining(),
26038            )
26039        }
26040        __tmp.put_u64_le(self.time_usec);
26041        __tmp.put_i16_le(self.press_abs);
26042        __tmp.put_i16_le(self.press_diff1);
26043        __tmp.put_i16_le(self.press_diff2);
26044        __tmp.put_i16_le(self.temperature);
26045        if matches!(version, MavlinkVersion::V2) {
26046            let len = __tmp.len();
26047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26048        } else {
26049            __tmp.len()
26050        }
26051    }
26052}
26053#[doc = "RPM sensor data message."]
26054#[doc = ""]
26055#[doc = "ID: 339"]
26056#[derive(Debug, Clone, PartialEq)]
26057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26059#[cfg_attr(feature = "ts", derive(TS))]
26060#[cfg_attr(feature = "ts", ts(export))]
26061pub struct RAW_RPM_DATA {
26062    #[doc = "Indicated rate"]
26063    pub frequency: f32,
26064    #[doc = "Index of this RPM sensor (0-indexed)"]
26065    pub index: u8,
26066}
26067impl RAW_RPM_DATA {
26068    pub const ENCODED_LEN: usize = 5usize;
26069    pub const DEFAULT: Self = Self {
26070        frequency: 0.0_f32,
26071        index: 0_u8,
26072    };
26073    #[cfg(feature = "arbitrary")]
26074    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26075        use arbitrary::{Arbitrary, Unstructured};
26076        let mut buf = [0u8; 1024];
26077        rng.fill_bytes(&mut buf);
26078        let mut unstructured = Unstructured::new(&buf);
26079        Self::arbitrary(&mut unstructured).unwrap_or_default()
26080    }
26081}
26082impl Default for RAW_RPM_DATA {
26083    fn default() -> Self {
26084        Self::DEFAULT.clone()
26085    }
26086}
26087impl MessageData for RAW_RPM_DATA {
26088    type Message = MavMessage;
26089    const ID: u32 = 339u32;
26090    const NAME: &'static str = "RAW_RPM";
26091    const EXTRA_CRC: u8 = 199u8;
26092    const ENCODED_LEN: usize = 5usize;
26093    fn deser(
26094        _version: MavlinkVersion,
26095        __input: &[u8],
26096    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26097        let avail_len = __input.len();
26098        let mut payload_buf = [0; Self::ENCODED_LEN];
26099        let mut buf = if avail_len < Self::ENCODED_LEN {
26100            payload_buf[0..avail_len].copy_from_slice(__input);
26101            Bytes::new(&payload_buf)
26102        } else {
26103            Bytes::new(__input)
26104        };
26105        let mut __struct = Self::default();
26106        __struct.frequency = buf.get_f32_le();
26107        __struct.index = buf.get_u8();
26108        Ok(__struct)
26109    }
26110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26111        let mut __tmp = BytesMut::new(bytes);
26112        #[allow(clippy::absurd_extreme_comparisons)]
26113        #[allow(unused_comparisons)]
26114        if __tmp.remaining() < Self::ENCODED_LEN {
26115            panic!(
26116                "buffer is too small (need {} bytes, but got {})",
26117                Self::ENCODED_LEN,
26118                __tmp.remaining(),
26119            )
26120        }
26121        __tmp.put_f32_le(self.frequency);
26122        __tmp.put_u8(self.index);
26123        if matches!(version, MavlinkVersion::V2) {
26124            let len = __tmp.len();
26125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26126        } else {
26127            __tmp.len()
26128        }
26129    }
26130}
26131#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26132#[doc = ""]
26133#[doc = "ID: 65"]
26134#[derive(Debug, Clone, PartialEq)]
26135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26137#[cfg_attr(feature = "ts", derive(TS))]
26138#[cfg_attr(feature = "ts", ts(export))]
26139pub struct RC_CHANNELS_DATA {
26140    #[doc = "Timestamp (time since system boot)."]
26141    pub time_boot_ms: u32,
26142    #[doc = "RC channel 1 value."]
26143    pub chan1_raw: u16,
26144    #[doc = "RC channel 2 value."]
26145    pub chan2_raw: u16,
26146    #[doc = "RC channel 3 value."]
26147    pub chan3_raw: u16,
26148    #[doc = "RC channel 4 value."]
26149    pub chan4_raw: u16,
26150    #[doc = "RC channel 5 value."]
26151    pub chan5_raw: u16,
26152    #[doc = "RC channel 6 value."]
26153    pub chan6_raw: u16,
26154    #[doc = "RC channel 7 value."]
26155    pub chan7_raw: u16,
26156    #[doc = "RC channel 8 value."]
26157    pub chan8_raw: u16,
26158    #[doc = "RC channel 9 value."]
26159    pub chan9_raw: u16,
26160    #[doc = "RC channel 10 value."]
26161    pub chan10_raw: u16,
26162    #[doc = "RC channel 11 value."]
26163    pub chan11_raw: u16,
26164    #[doc = "RC channel 12 value."]
26165    pub chan12_raw: u16,
26166    #[doc = "RC channel 13 value."]
26167    pub chan13_raw: u16,
26168    #[doc = "RC channel 14 value."]
26169    pub chan14_raw: u16,
26170    #[doc = "RC channel 15 value."]
26171    pub chan15_raw: u16,
26172    #[doc = "RC channel 16 value."]
26173    pub chan16_raw: u16,
26174    #[doc = "RC channel 17 value."]
26175    pub chan17_raw: u16,
26176    #[doc = "RC channel 18 value."]
26177    pub chan18_raw: u16,
26178    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26179    pub chancount: u8,
26180    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26181    pub rssi: u8,
26182}
26183impl RC_CHANNELS_DATA {
26184    pub const ENCODED_LEN: usize = 42usize;
26185    pub const DEFAULT: Self = Self {
26186        time_boot_ms: 0_u32,
26187        chan1_raw: 0_u16,
26188        chan2_raw: 0_u16,
26189        chan3_raw: 0_u16,
26190        chan4_raw: 0_u16,
26191        chan5_raw: 0_u16,
26192        chan6_raw: 0_u16,
26193        chan7_raw: 0_u16,
26194        chan8_raw: 0_u16,
26195        chan9_raw: 0_u16,
26196        chan10_raw: 0_u16,
26197        chan11_raw: 0_u16,
26198        chan12_raw: 0_u16,
26199        chan13_raw: 0_u16,
26200        chan14_raw: 0_u16,
26201        chan15_raw: 0_u16,
26202        chan16_raw: 0_u16,
26203        chan17_raw: 0_u16,
26204        chan18_raw: 0_u16,
26205        chancount: 0_u8,
26206        rssi: 0_u8,
26207    };
26208    #[cfg(feature = "arbitrary")]
26209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26210        use arbitrary::{Arbitrary, Unstructured};
26211        let mut buf = [0u8; 1024];
26212        rng.fill_bytes(&mut buf);
26213        let mut unstructured = Unstructured::new(&buf);
26214        Self::arbitrary(&mut unstructured).unwrap_or_default()
26215    }
26216}
26217impl Default for RC_CHANNELS_DATA {
26218    fn default() -> Self {
26219        Self::DEFAULT.clone()
26220    }
26221}
26222impl MessageData for RC_CHANNELS_DATA {
26223    type Message = MavMessage;
26224    const ID: u32 = 65u32;
26225    const NAME: &'static str = "RC_CHANNELS";
26226    const EXTRA_CRC: u8 = 118u8;
26227    const ENCODED_LEN: usize = 42usize;
26228    fn deser(
26229        _version: MavlinkVersion,
26230        __input: &[u8],
26231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26232        let avail_len = __input.len();
26233        let mut payload_buf = [0; Self::ENCODED_LEN];
26234        let mut buf = if avail_len < Self::ENCODED_LEN {
26235            payload_buf[0..avail_len].copy_from_slice(__input);
26236            Bytes::new(&payload_buf)
26237        } else {
26238            Bytes::new(__input)
26239        };
26240        let mut __struct = Self::default();
26241        __struct.time_boot_ms = buf.get_u32_le();
26242        __struct.chan1_raw = buf.get_u16_le();
26243        __struct.chan2_raw = buf.get_u16_le();
26244        __struct.chan3_raw = buf.get_u16_le();
26245        __struct.chan4_raw = buf.get_u16_le();
26246        __struct.chan5_raw = buf.get_u16_le();
26247        __struct.chan6_raw = buf.get_u16_le();
26248        __struct.chan7_raw = buf.get_u16_le();
26249        __struct.chan8_raw = buf.get_u16_le();
26250        __struct.chan9_raw = buf.get_u16_le();
26251        __struct.chan10_raw = buf.get_u16_le();
26252        __struct.chan11_raw = buf.get_u16_le();
26253        __struct.chan12_raw = buf.get_u16_le();
26254        __struct.chan13_raw = buf.get_u16_le();
26255        __struct.chan14_raw = buf.get_u16_le();
26256        __struct.chan15_raw = buf.get_u16_le();
26257        __struct.chan16_raw = buf.get_u16_le();
26258        __struct.chan17_raw = buf.get_u16_le();
26259        __struct.chan18_raw = buf.get_u16_le();
26260        __struct.chancount = buf.get_u8();
26261        __struct.rssi = buf.get_u8();
26262        Ok(__struct)
26263    }
26264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26265        let mut __tmp = BytesMut::new(bytes);
26266        #[allow(clippy::absurd_extreme_comparisons)]
26267        #[allow(unused_comparisons)]
26268        if __tmp.remaining() < Self::ENCODED_LEN {
26269            panic!(
26270                "buffer is too small (need {} bytes, but got {})",
26271                Self::ENCODED_LEN,
26272                __tmp.remaining(),
26273            )
26274        }
26275        __tmp.put_u32_le(self.time_boot_ms);
26276        __tmp.put_u16_le(self.chan1_raw);
26277        __tmp.put_u16_le(self.chan2_raw);
26278        __tmp.put_u16_le(self.chan3_raw);
26279        __tmp.put_u16_le(self.chan4_raw);
26280        __tmp.put_u16_le(self.chan5_raw);
26281        __tmp.put_u16_le(self.chan6_raw);
26282        __tmp.put_u16_le(self.chan7_raw);
26283        __tmp.put_u16_le(self.chan8_raw);
26284        __tmp.put_u16_le(self.chan9_raw);
26285        __tmp.put_u16_le(self.chan10_raw);
26286        __tmp.put_u16_le(self.chan11_raw);
26287        __tmp.put_u16_le(self.chan12_raw);
26288        __tmp.put_u16_le(self.chan13_raw);
26289        __tmp.put_u16_le(self.chan14_raw);
26290        __tmp.put_u16_le(self.chan15_raw);
26291        __tmp.put_u16_le(self.chan16_raw);
26292        __tmp.put_u16_le(self.chan17_raw);
26293        __tmp.put_u16_le(self.chan18_raw);
26294        __tmp.put_u8(self.chancount);
26295        __tmp.put_u8(self.rssi);
26296        if matches!(version, MavlinkVersion::V2) {
26297            let len = __tmp.len();
26298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26299        } else {
26300            __tmp.len()
26301        }
26302    }
26303}
26304#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26305#[doc = ""]
26306#[doc = "ID: 70"]
26307#[derive(Debug, Clone, PartialEq)]
26308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26310#[cfg_attr(feature = "ts", derive(TS))]
26311#[cfg_attr(feature = "ts", ts(export))]
26312pub struct RC_CHANNELS_OVERRIDE_DATA {
26313    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26314    pub chan1_raw: u16,
26315    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26316    pub chan2_raw: u16,
26317    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26318    pub chan3_raw: u16,
26319    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26320    pub chan4_raw: u16,
26321    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26322    pub chan5_raw: u16,
26323    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26324    pub chan6_raw: u16,
26325    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26326    pub chan7_raw: u16,
26327    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26328    pub chan8_raw: u16,
26329    #[doc = "System ID"]
26330    pub target_system: u8,
26331    #[doc = "Component ID"]
26332    pub target_component: u8,
26333    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26334    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26335    pub chan9_raw: u16,
26336    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26338    pub chan10_raw: u16,
26339    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26341    pub chan11_raw: u16,
26342    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26344    pub chan12_raw: u16,
26345    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26347    pub chan13_raw: u16,
26348    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26350    pub chan14_raw: u16,
26351    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26353    pub chan15_raw: u16,
26354    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26356    pub chan16_raw: u16,
26357    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26359    pub chan17_raw: u16,
26360    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26362    pub chan18_raw: u16,
26363}
26364impl RC_CHANNELS_OVERRIDE_DATA {
26365    pub const ENCODED_LEN: usize = 38usize;
26366    pub const DEFAULT: Self = Self {
26367        chan1_raw: 0_u16,
26368        chan2_raw: 0_u16,
26369        chan3_raw: 0_u16,
26370        chan4_raw: 0_u16,
26371        chan5_raw: 0_u16,
26372        chan6_raw: 0_u16,
26373        chan7_raw: 0_u16,
26374        chan8_raw: 0_u16,
26375        target_system: 0_u8,
26376        target_component: 0_u8,
26377        chan9_raw: 0_u16,
26378        chan10_raw: 0_u16,
26379        chan11_raw: 0_u16,
26380        chan12_raw: 0_u16,
26381        chan13_raw: 0_u16,
26382        chan14_raw: 0_u16,
26383        chan15_raw: 0_u16,
26384        chan16_raw: 0_u16,
26385        chan17_raw: 0_u16,
26386        chan18_raw: 0_u16,
26387    };
26388    #[cfg(feature = "arbitrary")]
26389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26390        use arbitrary::{Arbitrary, Unstructured};
26391        let mut buf = [0u8; 1024];
26392        rng.fill_bytes(&mut buf);
26393        let mut unstructured = Unstructured::new(&buf);
26394        Self::arbitrary(&mut unstructured).unwrap_or_default()
26395    }
26396}
26397impl Default for RC_CHANNELS_OVERRIDE_DATA {
26398    fn default() -> Self {
26399        Self::DEFAULT.clone()
26400    }
26401}
26402impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26403    type Message = MavMessage;
26404    const ID: u32 = 70u32;
26405    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26406    const EXTRA_CRC: u8 = 124u8;
26407    const ENCODED_LEN: usize = 38usize;
26408    fn deser(
26409        _version: MavlinkVersion,
26410        __input: &[u8],
26411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26412        let avail_len = __input.len();
26413        let mut payload_buf = [0; Self::ENCODED_LEN];
26414        let mut buf = if avail_len < Self::ENCODED_LEN {
26415            payload_buf[0..avail_len].copy_from_slice(__input);
26416            Bytes::new(&payload_buf)
26417        } else {
26418            Bytes::new(__input)
26419        };
26420        let mut __struct = Self::default();
26421        __struct.chan1_raw = buf.get_u16_le();
26422        __struct.chan2_raw = buf.get_u16_le();
26423        __struct.chan3_raw = buf.get_u16_le();
26424        __struct.chan4_raw = buf.get_u16_le();
26425        __struct.chan5_raw = buf.get_u16_le();
26426        __struct.chan6_raw = buf.get_u16_le();
26427        __struct.chan7_raw = buf.get_u16_le();
26428        __struct.chan8_raw = buf.get_u16_le();
26429        __struct.target_system = buf.get_u8();
26430        __struct.target_component = buf.get_u8();
26431        __struct.chan9_raw = buf.get_u16_le();
26432        __struct.chan10_raw = buf.get_u16_le();
26433        __struct.chan11_raw = buf.get_u16_le();
26434        __struct.chan12_raw = buf.get_u16_le();
26435        __struct.chan13_raw = buf.get_u16_le();
26436        __struct.chan14_raw = buf.get_u16_le();
26437        __struct.chan15_raw = buf.get_u16_le();
26438        __struct.chan16_raw = buf.get_u16_le();
26439        __struct.chan17_raw = buf.get_u16_le();
26440        __struct.chan18_raw = buf.get_u16_le();
26441        Ok(__struct)
26442    }
26443    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26444        let mut __tmp = BytesMut::new(bytes);
26445        #[allow(clippy::absurd_extreme_comparisons)]
26446        #[allow(unused_comparisons)]
26447        if __tmp.remaining() < Self::ENCODED_LEN {
26448            panic!(
26449                "buffer is too small (need {} bytes, but got {})",
26450                Self::ENCODED_LEN,
26451                __tmp.remaining(),
26452            )
26453        }
26454        __tmp.put_u16_le(self.chan1_raw);
26455        __tmp.put_u16_le(self.chan2_raw);
26456        __tmp.put_u16_le(self.chan3_raw);
26457        __tmp.put_u16_le(self.chan4_raw);
26458        __tmp.put_u16_le(self.chan5_raw);
26459        __tmp.put_u16_le(self.chan6_raw);
26460        __tmp.put_u16_le(self.chan7_raw);
26461        __tmp.put_u16_le(self.chan8_raw);
26462        __tmp.put_u8(self.target_system);
26463        __tmp.put_u8(self.target_component);
26464        if matches!(version, MavlinkVersion::V2) {
26465            __tmp.put_u16_le(self.chan9_raw);
26466            __tmp.put_u16_le(self.chan10_raw);
26467            __tmp.put_u16_le(self.chan11_raw);
26468            __tmp.put_u16_le(self.chan12_raw);
26469            __tmp.put_u16_le(self.chan13_raw);
26470            __tmp.put_u16_le(self.chan14_raw);
26471            __tmp.put_u16_le(self.chan15_raw);
26472            __tmp.put_u16_le(self.chan16_raw);
26473            __tmp.put_u16_le(self.chan17_raw);
26474            __tmp.put_u16_le(self.chan18_raw);
26475            let len = __tmp.len();
26476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26477        } else {
26478            __tmp.len()
26479        }
26480    }
26481}
26482#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26483#[doc = ""]
26484#[doc = "ID: 35"]
26485#[derive(Debug, Clone, PartialEq)]
26486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26488#[cfg_attr(feature = "ts", derive(TS))]
26489#[cfg_attr(feature = "ts", ts(export))]
26490pub struct RC_CHANNELS_RAW_DATA {
26491    #[doc = "Timestamp (time since system boot)."]
26492    pub time_boot_ms: u32,
26493    #[doc = "RC channel 1 value."]
26494    pub chan1_raw: u16,
26495    #[doc = "RC channel 2 value."]
26496    pub chan2_raw: u16,
26497    #[doc = "RC channel 3 value."]
26498    pub chan3_raw: u16,
26499    #[doc = "RC channel 4 value."]
26500    pub chan4_raw: u16,
26501    #[doc = "RC channel 5 value."]
26502    pub chan5_raw: u16,
26503    #[doc = "RC channel 6 value."]
26504    pub chan6_raw: u16,
26505    #[doc = "RC channel 7 value."]
26506    pub chan7_raw: u16,
26507    #[doc = "RC channel 8 value."]
26508    pub chan8_raw: u16,
26509    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26510    pub port: u8,
26511    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26512    pub rssi: u8,
26513}
26514impl RC_CHANNELS_RAW_DATA {
26515    pub const ENCODED_LEN: usize = 22usize;
26516    pub const DEFAULT: Self = Self {
26517        time_boot_ms: 0_u32,
26518        chan1_raw: 0_u16,
26519        chan2_raw: 0_u16,
26520        chan3_raw: 0_u16,
26521        chan4_raw: 0_u16,
26522        chan5_raw: 0_u16,
26523        chan6_raw: 0_u16,
26524        chan7_raw: 0_u16,
26525        chan8_raw: 0_u16,
26526        port: 0_u8,
26527        rssi: 0_u8,
26528    };
26529    #[cfg(feature = "arbitrary")]
26530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26531        use arbitrary::{Arbitrary, Unstructured};
26532        let mut buf = [0u8; 1024];
26533        rng.fill_bytes(&mut buf);
26534        let mut unstructured = Unstructured::new(&buf);
26535        Self::arbitrary(&mut unstructured).unwrap_or_default()
26536    }
26537}
26538impl Default for RC_CHANNELS_RAW_DATA {
26539    fn default() -> Self {
26540        Self::DEFAULT.clone()
26541    }
26542}
26543impl MessageData for RC_CHANNELS_RAW_DATA {
26544    type Message = MavMessage;
26545    const ID: u32 = 35u32;
26546    const NAME: &'static str = "RC_CHANNELS_RAW";
26547    const EXTRA_CRC: u8 = 244u8;
26548    const ENCODED_LEN: usize = 22usize;
26549    fn deser(
26550        _version: MavlinkVersion,
26551        __input: &[u8],
26552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26553        let avail_len = __input.len();
26554        let mut payload_buf = [0; Self::ENCODED_LEN];
26555        let mut buf = if avail_len < Self::ENCODED_LEN {
26556            payload_buf[0..avail_len].copy_from_slice(__input);
26557            Bytes::new(&payload_buf)
26558        } else {
26559            Bytes::new(__input)
26560        };
26561        let mut __struct = Self::default();
26562        __struct.time_boot_ms = buf.get_u32_le();
26563        __struct.chan1_raw = buf.get_u16_le();
26564        __struct.chan2_raw = buf.get_u16_le();
26565        __struct.chan3_raw = buf.get_u16_le();
26566        __struct.chan4_raw = buf.get_u16_le();
26567        __struct.chan5_raw = buf.get_u16_le();
26568        __struct.chan6_raw = buf.get_u16_le();
26569        __struct.chan7_raw = buf.get_u16_le();
26570        __struct.chan8_raw = buf.get_u16_le();
26571        __struct.port = buf.get_u8();
26572        __struct.rssi = buf.get_u8();
26573        Ok(__struct)
26574    }
26575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26576        let mut __tmp = BytesMut::new(bytes);
26577        #[allow(clippy::absurd_extreme_comparisons)]
26578        #[allow(unused_comparisons)]
26579        if __tmp.remaining() < Self::ENCODED_LEN {
26580            panic!(
26581                "buffer is too small (need {} bytes, but got {})",
26582                Self::ENCODED_LEN,
26583                __tmp.remaining(),
26584            )
26585        }
26586        __tmp.put_u32_le(self.time_boot_ms);
26587        __tmp.put_u16_le(self.chan1_raw);
26588        __tmp.put_u16_le(self.chan2_raw);
26589        __tmp.put_u16_le(self.chan3_raw);
26590        __tmp.put_u16_le(self.chan4_raw);
26591        __tmp.put_u16_le(self.chan5_raw);
26592        __tmp.put_u16_le(self.chan6_raw);
26593        __tmp.put_u16_le(self.chan7_raw);
26594        __tmp.put_u16_le(self.chan8_raw);
26595        __tmp.put_u8(self.port);
26596        __tmp.put_u8(self.rssi);
26597        if matches!(version, MavlinkVersion::V2) {
26598            let len = __tmp.len();
26599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26600        } else {
26601            __tmp.len()
26602        }
26603    }
26604}
26605#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26606#[doc = ""]
26607#[doc = "ID: 34"]
26608#[derive(Debug, Clone, PartialEq)]
26609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26611#[cfg_attr(feature = "ts", derive(TS))]
26612#[cfg_attr(feature = "ts", ts(export))]
26613pub struct RC_CHANNELS_SCALED_DATA {
26614    #[doc = "Timestamp (time since system boot)."]
26615    pub time_boot_ms: u32,
26616    #[doc = "RC channel 1 value scaled."]
26617    pub chan1_scaled: i16,
26618    #[doc = "RC channel 2 value scaled."]
26619    pub chan2_scaled: i16,
26620    #[doc = "RC channel 3 value scaled."]
26621    pub chan3_scaled: i16,
26622    #[doc = "RC channel 4 value scaled."]
26623    pub chan4_scaled: i16,
26624    #[doc = "RC channel 5 value scaled."]
26625    pub chan5_scaled: i16,
26626    #[doc = "RC channel 6 value scaled."]
26627    pub chan6_scaled: i16,
26628    #[doc = "RC channel 7 value scaled."]
26629    pub chan7_scaled: i16,
26630    #[doc = "RC channel 8 value scaled."]
26631    pub chan8_scaled: i16,
26632    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26633    pub port: u8,
26634    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26635    pub rssi: u8,
26636}
26637impl RC_CHANNELS_SCALED_DATA {
26638    pub const ENCODED_LEN: usize = 22usize;
26639    pub const DEFAULT: Self = Self {
26640        time_boot_ms: 0_u32,
26641        chan1_scaled: 0_i16,
26642        chan2_scaled: 0_i16,
26643        chan3_scaled: 0_i16,
26644        chan4_scaled: 0_i16,
26645        chan5_scaled: 0_i16,
26646        chan6_scaled: 0_i16,
26647        chan7_scaled: 0_i16,
26648        chan8_scaled: 0_i16,
26649        port: 0_u8,
26650        rssi: 0_u8,
26651    };
26652    #[cfg(feature = "arbitrary")]
26653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26654        use arbitrary::{Arbitrary, Unstructured};
26655        let mut buf = [0u8; 1024];
26656        rng.fill_bytes(&mut buf);
26657        let mut unstructured = Unstructured::new(&buf);
26658        Self::arbitrary(&mut unstructured).unwrap_or_default()
26659    }
26660}
26661impl Default for RC_CHANNELS_SCALED_DATA {
26662    fn default() -> Self {
26663        Self::DEFAULT.clone()
26664    }
26665}
26666impl MessageData for RC_CHANNELS_SCALED_DATA {
26667    type Message = MavMessage;
26668    const ID: u32 = 34u32;
26669    const NAME: &'static str = "RC_CHANNELS_SCALED";
26670    const EXTRA_CRC: u8 = 237u8;
26671    const ENCODED_LEN: usize = 22usize;
26672    fn deser(
26673        _version: MavlinkVersion,
26674        __input: &[u8],
26675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26676        let avail_len = __input.len();
26677        let mut payload_buf = [0; Self::ENCODED_LEN];
26678        let mut buf = if avail_len < Self::ENCODED_LEN {
26679            payload_buf[0..avail_len].copy_from_slice(__input);
26680            Bytes::new(&payload_buf)
26681        } else {
26682            Bytes::new(__input)
26683        };
26684        let mut __struct = Self::default();
26685        __struct.time_boot_ms = buf.get_u32_le();
26686        __struct.chan1_scaled = buf.get_i16_le();
26687        __struct.chan2_scaled = buf.get_i16_le();
26688        __struct.chan3_scaled = buf.get_i16_le();
26689        __struct.chan4_scaled = buf.get_i16_le();
26690        __struct.chan5_scaled = buf.get_i16_le();
26691        __struct.chan6_scaled = buf.get_i16_le();
26692        __struct.chan7_scaled = buf.get_i16_le();
26693        __struct.chan8_scaled = buf.get_i16_le();
26694        __struct.port = buf.get_u8();
26695        __struct.rssi = buf.get_u8();
26696        Ok(__struct)
26697    }
26698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26699        let mut __tmp = BytesMut::new(bytes);
26700        #[allow(clippy::absurd_extreme_comparisons)]
26701        #[allow(unused_comparisons)]
26702        if __tmp.remaining() < Self::ENCODED_LEN {
26703            panic!(
26704                "buffer is too small (need {} bytes, but got {})",
26705                Self::ENCODED_LEN,
26706                __tmp.remaining(),
26707            )
26708        }
26709        __tmp.put_u32_le(self.time_boot_ms);
26710        __tmp.put_i16_le(self.chan1_scaled);
26711        __tmp.put_i16_le(self.chan2_scaled);
26712        __tmp.put_i16_le(self.chan3_scaled);
26713        __tmp.put_i16_le(self.chan4_scaled);
26714        __tmp.put_i16_le(self.chan5_scaled);
26715        __tmp.put_i16_le(self.chan6_scaled);
26716        __tmp.put_i16_le(self.chan7_scaled);
26717        __tmp.put_i16_le(self.chan8_scaled);
26718        __tmp.put_u8(self.port);
26719        __tmp.put_u8(self.rssi);
26720        if matches!(version, MavlinkVersion::V2) {
26721            let len = __tmp.len();
26722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26723        } else {
26724            __tmp.len()
26725        }
26726    }
26727}
26728#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26729#[doc = "Request a data stream."]
26730#[doc = ""]
26731#[doc = "ID: 66"]
26732#[derive(Debug, Clone, PartialEq)]
26733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26735#[cfg_attr(feature = "ts", derive(TS))]
26736#[cfg_attr(feature = "ts", ts(export))]
26737pub struct REQUEST_DATA_STREAM_DATA {
26738    #[doc = "The requested message rate"]
26739    pub req_message_rate: u16,
26740    #[doc = "The target requested to send the message stream."]
26741    pub target_system: u8,
26742    #[doc = "The target requested to send the message stream."]
26743    pub target_component: u8,
26744    #[doc = "The ID of the requested data stream"]
26745    pub req_stream_id: u8,
26746    #[doc = "1 to start sending, 0 to stop sending."]
26747    pub start_stop: u8,
26748}
26749impl REQUEST_DATA_STREAM_DATA {
26750    pub const ENCODED_LEN: usize = 6usize;
26751    pub const DEFAULT: Self = Self {
26752        req_message_rate: 0_u16,
26753        target_system: 0_u8,
26754        target_component: 0_u8,
26755        req_stream_id: 0_u8,
26756        start_stop: 0_u8,
26757    };
26758    #[cfg(feature = "arbitrary")]
26759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26760        use arbitrary::{Arbitrary, Unstructured};
26761        let mut buf = [0u8; 1024];
26762        rng.fill_bytes(&mut buf);
26763        let mut unstructured = Unstructured::new(&buf);
26764        Self::arbitrary(&mut unstructured).unwrap_or_default()
26765    }
26766}
26767impl Default for REQUEST_DATA_STREAM_DATA {
26768    fn default() -> Self {
26769        Self::DEFAULT.clone()
26770    }
26771}
26772impl MessageData for REQUEST_DATA_STREAM_DATA {
26773    type Message = MavMessage;
26774    const ID: u32 = 66u32;
26775    const NAME: &'static str = "REQUEST_DATA_STREAM";
26776    const EXTRA_CRC: u8 = 148u8;
26777    const ENCODED_LEN: usize = 6usize;
26778    fn deser(
26779        _version: MavlinkVersion,
26780        __input: &[u8],
26781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26782        let avail_len = __input.len();
26783        let mut payload_buf = [0; Self::ENCODED_LEN];
26784        let mut buf = if avail_len < Self::ENCODED_LEN {
26785            payload_buf[0..avail_len].copy_from_slice(__input);
26786            Bytes::new(&payload_buf)
26787        } else {
26788            Bytes::new(__input)
26789        };
26790        let mut __struct = Self::default();
26791        __struct.req_message_rate = buf.get_u16_le();
26792        __struct.target_system = buf.get_u8();
26793        __struct.target_component = buf.get_u8();
26794        __struct.req_stream_id = buf.get_u8();
26795        __struct.start_stop = buf.get_u8();
26796        Ok(__struct)
26797    }
26798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26799        let mut __tmp = BytesMut::new(bytes);
26800        #[allow(clippy::absurd_extreme_comparisons)]
26801        #[allow(unused_comparisons)]
26802        if __tmp.remaining() < Self::ENCODED_LEN {
26803            panic!(
26804                "buffer is too small (need {} bytes, but got {})",
26805                Self::ENCODED_LEN,
26806                __tmp.remaining(),
26807            )
26808        }
26809        __tmp.put_u16_le(self.req_message_rate);
26810        __tmp.put_u8(self.target_system);
26811        __tmp.put_u8(self.target_component);
26812        __tmp.put_u8(self.req_stream_id);
26813        __tmp.put_u8(self.start_stop);
26814        if matches!(version, MavlinkVersion::V2) {
26815            let len = __tmp.len();
26816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26817        } else {
26818            __tmp.len()
26819        }
26820    }
26821}
26822#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26823#[doc = ""]
26824#[doc = "ID: 412"]
26825#[derive(Debug, Clone, PartialEq)]
26826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26828#[cfg_attr(feature = "ts", derive(TS))]
26829#[cfg_attr(feature = "ts", ts(export))]
26830pub struct REQUEST_EVENT_DATA {
26831    #[doc = "First sequence number of the requested event."]
26832    pub first_sequence: u16,
26833    #[doc = "Last sequence number of the requested event."]
26834    pub last_sequence: u16,
26835    #[doc = "System ID"]
26836    pub target_system: u8,
26837    #[doc = "Component ID"]
26838    pub target_component: u8,
26839}
26840impl REQUEST_EVENT_DATA {
26841    pub const ENCODED_LEN: usize = 6usize;
26842    pub const DEFAULT: Self = Self {
26843        first_sequence: 0_u16,
26844        last_sequence: 0_u16,
26845        target_system: 0_u8,
26846        target_component: 0_u8,
26847    };
26848    #[cfg(feature = "arbitrary")]
26849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26850        use arbitrary::{Arbitrary, Unstructured};
26851        let mut buf = [0u8; 1024];
26852        rng.fill_bytes(&mut buf);
26853        let mut unstructured = Unstructured::new(&buf);
26854        Self::arbitrary(&mut unstructured).unwrap_or_default()
26855    }
26856}
26857impl Default for REQUEST_EVENT_DATA {
26858    fn default() -> Self {
26859        Self::DEFAULT.clone()
26860    }
26861}
26862impl MessageData for REQUEST_EVENT_DATA {
26863    type Message = MavMessage;
26864    const ID: u32 = 412u32;
26865    const NAME: &'static str = "REQUEST_EVENT";
26866    const EXTRA_CRC: u8 = 33u8;
26867    const ENCODED_LEN: usize = 6usize;
26868    fn deser(
26869        _version: MavlinkVersion,
26870        __input: &[u8],
26871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26872        let avail_len = __input.len();
26873        let mut payload_buf = [0; Self::ENCODED_LEN];
26874        let mut buf = if avail_len < Self::ENCODED_LEN {
26875            payload_buf[0..avail_len].copy_from_slice(__input);
26876            Bytes::new(&payload_buf)
26877        } else {
26878            Bytes::new(__input)
26879        };
26880        let mut __struct = Self::default();
26881        __struct.first_sequence = buf.get_u16_le();
26882        __struct.last_sequence = buf.get_u16_le();
26883        __struct.target_system = buf.get_u8();
26884        __struct.target_component = buf.get_u8();
26885        Ok(__struct)
26886    }
26887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26888        let mut __tmp = BytesMut::new(bytes);
26889        #[allow(clippy::absurd_extreme_comparisons)]
26890        #[allow(unused_comparisons)]
26891        if __tmp.remaining() < Self::ENCODED_LEN {
26892            panic!(
26893                "buffer is too small (need {} bytes, but got {})",
26894                Self::ENCODED_LEN,
26895                __tmp.remaining(),
26896            )
26897        }
26898        __tmp.put_u16_le(self.first_sequence);
26899        __tmp.put_u16_le(self.last_sequence);
26900        __tmp.put_u8(self.target_system);
26901        __tmp.put_u8(self.target_component);
26902        if matches!(version, MavlinkVersion::V2) {
26903            let len = __tmp.len();
26904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26905        } else {
26906            __tmp.len()
26907        }
26908    }
26909}
26910#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26911#[doc = ""]
26912#[doc = "ID: 142"]
26913#[derive(Debug, Clone, PartialEq)]
26914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26916#[cfg_attr(feature = "ts", derive(TS))]
26917#[cfg_attr(feature = "ts", ts(export))]
26918pub struct RESOURCE_REQUEST_DATA {
26919    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26920    pub request_id: u8,
26921    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26922    pub uri_type: u8,
26923    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26926    pub uri: [u8; 120],
26927    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26928    pub transfer_type: u8,
26929    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26930    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26931    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26932    pub storage: [u8; 120],
26933}
26934impl RESOURCE_REQUEST_DATA {
26935    pub const ENCODED_LEN: usize = 243usize;
26936    pub const DEFAULT: Self = Self {
26937        request_id: 0_u8,
26938        uri_type: 0_u8,
26939        uri: [0_u8; 120usize],
26940        transfer_type: 0_u8,
26941        storage: [0_u8; 120usize],
26942    };
26943    #[cfg(feature = "arbitrary")]
26944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26945        use arbitrary::{Arbitrary, Unstructured};
26946        let mut buf = [0u8; 1024];
26947        rng.fill_bytes(&mut buf);
26948        let mut unstructured = Unstructured::new(&buf);
26949        Self::arbitrary(&mut unstructured).unwrap_or_default()
26950    }
26951}
26952impl Default for RESOURCE_REQUEST_DATA {
26953    fn default() -> Self {
26954        Self::DEFAULT.clone()
26955    }
26956}
26957impl MessageData for RESOURCE_REQUEST_DATA {
26958    type Message = MavMessage;
26959    const ID: u32 = 142u32;
26960    const NAME: &'static str = "RESOURCE_REQUEST";
26961    const EXTRA_CRC: u8 = 72u8;
26962    const ENCODED_LEN: usize = 243usize;
26963    fn deser(
26964        _version: MavlinkVersion,
26965        __input: &[u8],
26966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26967        let avail_len = __input.len();
26968        let mut payload_buf = [0; Self::ENCODED_LEN];
26969        let mut buf = if avail_len < Self::ENCODED_LEN {
26970            payload_buf[0..avail_len].copy_from_slice(__input);
26971            Bytes::new(&payload_buf)
26972        } else {
26973            Bytes::new(__input)
26974        };
26975        let mut __struct = Self::default();
26976        __struct.request_id = buf.get_u8();
26977        __struct.uri_type = buf.get_u8();
26978        for v in &mut __struct.uri {
26979            let val = buf.get_u8();
26980            *v = val;
26981        }
26982        __struct.transfer_type = buf.get_u8();
26983        for v in &mut __struct.storage {
26984            let val = buf.get_u8();
26985            *v = val;
26986        }
26987        Ok(__struct)
26988    }
26989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26990        let mut __tmp = BytesMut::new(bytes);
26991        #[allow(clippy::absurd_extreme_comparisons)]
26992        #[allow(unused_comparisons)]
26993        if __tmp.remaining() < Self::ENCODED_LEN {
26994            panic!(
26995                "buffer is too small (need {} bytes, but got {})",
26996                Self::ENCODED_LEN,
26997                __tmp.remaining(),
26998            )
26999        }
27000        __tmp.put_u8(self.request_id);
27001        __tmp.put_u8(self.uri_type);
27002        for val in &self.uri {
27003            __tmp.put_u8(*val);
27004        }
27005        __tmp.put_u8(self.transfer_type);
27006        for val in &self.storage {
27007            __tmp.put_u8(*val);
27008        }
27009        if matches!(version, MavlinkVersion::V2) {
27010            let len = __tmp.len();
27011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27012        } else {
27013            __tmp.len()
27014        }
27015    }
27016}
27017#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27018#[doc = ""]
27019#[doc = "ID: 413"]
27020#[derive(Debug, Clone, PartialEq)]
27021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27023#[cfg_attr(feature = "ts", derive(TS))]
27024#[cfg_attr(feature = "ts", ts(export))]
27025pub struct RESPONSE_EVENT_ERROR_DATA {
27026    #[doc = "Sequence number."]
27027    pub sequence: u16,
27028    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27029    pub sequence_oldest_available: u16,
27030    #[doc = "System ID"]
27031    pub target_system: u8,
27032    #[doc = "Component ID"]
27033    pub target_component: u8,
27034    #[doc = "Error reason."]
27035    pub reason: MavEventErrorReason,
27036}
27037impl RESPONSE_EVENT_ERROR_DATA {
27038    pub const ENCODED_LEN: usize = 7usize;
27039    pub const DEFAULT: Self = Self {
27040        sequence: 0_u16,
27041        sequence_oldest_available: 0_u16,
27042        target_system: 0_u8,
27043        target_component: 0_u8,
27044        reason: MavEventErrorReason::DEFAULT,
27045    };
27046    #[cfg(feature = "arbitrary")]
27047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27048        use arbitrary::{Arbitrary, Unstructured};
27049        let mut buf = [0u8; 1024];
27050        rng.fill_bytes(&mut buf);
27051        let mut unstructured = Unstructured::new(&buf);
27052        Self::arbitrary(&mut unstructured).unwrap_or_default()
27053    }
27054}
27055impl Default for RESPONSE_EVENT_ERROR_DATA {
27056    fn default() -> Self {
27057        Self::DEFAULT.clone()
27058    }
27059}
27060impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27061    type Message = MavMessage;
27062    const ID: u32 = 413u32;
27063    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27064    const EXTRA_CRC: u8 = 77u8;
27065    const ENCODED_LEN: usize = 7usize;
27066    fn deser(
27067        _version: MavlinkVersion,
27068        __input: &[u8],
27069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27070        let avail_len = __input.len();
27071        let mut payload_buf = [0; Self::ENCODED_LEN];
27072        let mut buf = if avail_len < Self::ENCODED_LEN {
27073            payload_buf[0..avail_len].copy_from_slice(__input);
27074            Bytes::new(&payload_buf)
27075        } else {
27076            Bytes::new(__input)
27077        };
27078        let mut __struct = Self::default();
27079        __struct.sequence = buf.get_u16_le();
27080        __struct.sequence_oldest_available = buf.get_u16_le();
27081        __struct.target_system = buf.get_u8();
27082        __struct.target_component = buf.get_u8();
27083        let tmp = buf.get_u8();
27084        __struct.reason =
27085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27086                enum_type: "MavEventErrorReason",
27087                value: tmp as u32,
27088            })?;
27089        Ok(__struct)
27090    }
27091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27092        let mut __tmp = BytesMut::new(bytes);
27093        #[allow(clippy::absurd_extreme_comparisons)]
27094        #[allow(unused_comparisons)]
27095        if __tmp.remaining() < Self::ENCODED_LEN {
27096            panic!(
27097                "buffer is too small (need {} bytes, but got {})",
27098                Self::ENCODED_LEN,
27099                __tmp.remaining(),
27100            )
27101        }
27102        __tmp.put_u16_le(self.sequence);
27103        __tmp.put_u16_le(self.sequence_oldest_available);
27104        __tmp.put_u8(self.target_system);
27105        __tmp.put_u8(self.target_component);
27106        __tmp.put_u8(self.reason as u8);
27107        if matches!(version, MavlinkVersion::V2) {
27108            let len = __tmp.len();
27109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27110        } else {
27111            __tmp.len()
27112        }
27113    }
27114}
27115#[doc = "Read out the safety zone the MAV currently assumes."]
27116#[doc = ""]
27117#[doc = "ID: 55"]
27118#[derive(Debug, Clone, PartialEq)]
27119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27121#[cfg_attr(feature = "ts", derive(TS))]
27122#[cfg_attr(feature = "ts", ts(export))]
27123pub struct SAFETY_ALLOWED_AREA_DATA {
27124    #[doc = "x position 1 / Latitude 1"]
27125    pub p1x: f32,
27126    #[doc = "y position 1 / Longitude 1"]
27127    pub p1y: f32,
27128    #[doc = "z position 1 / Altitude 1"]
27129    pub p1z: f32,
27130    #[doc = "x position 2 / Latitude 2"]
27131    pub p2x: f32,
27132    #[doc = "y position 2 / Longitude 2"]
27133    pub p2y: f32,
27134    #[doc = "z position 2 / Altitude 2"]
27135    pub p2z: f32,
27136    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27137    pub frame: MavFrame,
27138}
27139impl SAFETY_ALLOWED_AREA_DATA {
27140    pub const ENCODED_LEN: usize = 25usize;
27141    pub const DEFAULT: Self = Self {
27142        p1x: 0.0_f32,
27143        p1y: 0.0_f32,
27144        p1z: 0.0_f32,
27145        p2x: 0.0_f32,
27146        p2y: 0.0_f32,
27147        p2z: 0.0_f32,
27148        frame: MavFrame::DEFAULT,
27149    };
27150    #[cfg(feature = "arbitrary")]
27151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27152        use arbitrary::{Arbitrary, Unstructured};
27153        let mut buf = [0u8; 1024];
27154        rng.fill_bytes(&mut buf);
27155        let mut unstructured = Unstructured::new(&buf);
27156        Self::arbitrary(&mut unstructured).unwrap_or_default()
27157    }
27158}
27159impl Default for SAFETY_ALLOWED_AREA_DATA {
27160    fn default() -> Self {
27161        Self::DEFAULT.clone()
27162    }
27163}
27164impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27165    type Message = MavMessage;
27166    const ID: u32 = 55u32;
27167    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27168    const EXTRA_CRC: u8 = 3u8;
27169    const ENCODED_LEN: usize = 25usize;
27170    fn deser(
27171        _version: MavlinkVersion,
27172        __input: &[u8],
27173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27174        let avail_len = __input.len();
27175        let mut payload_buf = [0; Self::ENCODED_LEN];
27176        let mut buf = if avail_len < Self::ENCODED_LEN {
27177            payload_buf[0..avail_len].copy_from_slice(__input);
27178            Bytes::new(&payload_buf)
27179        } else {
27180            Bytes::new(__input)
27181        };
27182        let mut __struct = Self::default();
27183        __struct.p1x = buf.get_f32_le();
27184        __struct.p1y = buf.get_f32_le();
27185        __struct.p1z = buf.get_f32_le();
27186        __struct.p2x = buf.get_f32_le();
27187        __struct.p2y = buf.get_f32_le();
27188        __struct.p2z = buf.get_f32_le();
27189        let tmp = buf.get_u8();
27190        __struct.frame =
27191            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27192                enum_type: "MavFrame",
27193                value: tmp as u32,
27194            })?;
27195        Ok(__struct)
27196    }
27197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27198        let mut __tmp = BytesMut::new(bytes);
27199        #[allow(clippy::absurd_extreme_comparisons)]
27200        #[allow(unused_comparisons)]
27201        if __tmp.remaining() < Self::ENCODED_LEN {
27202            panic!(
27203                "buffer is too small (need {} bytes, but got {})",
27204                Self::ENCODED_LEN,
27205                __tmp.remaining(),
27206            )
27207        }
27208        __tmp.put_f32_le(self.p1x);
27209        __tmp.put_f32_le(self.p1y);
27210        __tmp.put_f32_le(self.p1z);
27211        __tmp.put_f32_le(self.p2x);
27212        __tmp.put_f32_le(self.p2y);
27213        __tmp.put_f32_le(self.p2z);
27214        __tmp.put_u8(self.frame as u8);
27215        if matches!(version, MavlinkVersion::V2) {
27216            let len = __tmp.len();
27217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27218        } else {
27219            __tmp.len()
27220        }
27221    }
27222}
27223#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27224#[doc = ""]
27225#[doc = "ID: 54"]
27226#[derive(Debug, Clone, PartialEq)]
27227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27229#[cfg_attr(feature = "ts", derive(TS))]
27230#[cfg_attr(feature = "ts", ts(export))]
27231pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27232    #[doc = "x position 1 / Latitude 1"]
27233    pub p1x: f32,
27234    #[doc = "y position 1 / Longitude 1"]
27235    pub p1y: f32,
27236    #[doc = "z position 1 / Altitude 1"]
27237    pub p1z: f32,
27238    #[doc = "x position 2 / Latitude 2"]
27239    pub p2x: f32,
27240    #[doc = "y position 2 / Longitude 2"]
27241    pub p2y: f32,
27242    #[doc = "z position 2 / Altitude 2"]
27243    pub p2z: f32,
27244    #[doc = "System ID"]
27245    pub target_system: u8,
27246    #[doc = "Component ID"]
27247    pub target_component: u8,
27248    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27249    pub frame: MavFrame,
27250}
27251impl SAFETY_SET_ALLOWED_AREA_DATA {
27252    pub const ENCODED_LEN: usize = 27usize;
27253    pub const DEFAULT: Self = Self {
27254        p1x: 0.0_f32,
27255        p1y: 0.0_f32,
27256        p1z: 0.0_f32,
27257        p2x: 0.0_f32,
27258        p2y: 0.0_f32,
27259        p2z: 0.0_f32,
27260        target_system: 0_u8,
27261        target_component: 0_u8,
27262        frame: MavFrame::DEFAULT,
27263    };
27264    #[cfg(feature = "arbitrary")]
27265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27266        use arbitrary::{Arbitrary, Unstructured};
27267        let mut buf = [0u8; 1024];
27268        rng.fill_bytes(&mut buf);
27269        let mut unstructured = Unstructured::new(&buf);
27270        Self::arbitrary(&mut unstructured).unwrap_or_default()
27271    }
27272}
27273impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27274    fn default() -> Self {
27275        Self::DEFAULT.clone()
27276    }
27277}
27278impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27279    type Message = MavMessage;
27280    const ID: u32 = 54u32;
27281    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27282    const EXTRA_CRC: u8 = 15u8;
27283    const ENCODED_LEN: usize = 27usize;
27284    fn deser(
27285        _version: MavlinkVersion,
27286        __input: &[u8],
27287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27288        let avail_len = __input.len();
27289        let mut payload_buf = [0; Self::ENCODED_LEN];
27290        let mut buf = if avail_len < Self::ENCODED_LEN {
27291            payload_buf[0..avail_len].copy_from_slice(__input);
27292            Bytes::new(&payload_buf)
27293        } else {
27294            Bytes::new(__input)
27295        };
27296        let mut __struct = Self::default();
27297        __struct.p1x = buf.get_f32_le();
27298        __struct.p1y = buf.get_f32_le();
27299        __struct.p1z = buf.get_f32_le();
27300        __struct.p2x = buf.get_f32_le();
27301        __struct.p2y = buf.get_f32_le();
27302        __struct.p2z = buf.get_f32_le();
27303        __struct.target_system = buf.get_u8();
27304        __struct.target_component = buf.get_u8();
27305        let tmp = buf.get_u8();
27306        __struct.frame =
27307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27308                enum_type: "MavFrame",
27309                value: tmp as u32,
27310            })?;
27311        Ok(__struct)
27312    }
27313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27314        let mut __tmp = BytesMut::new(bytes);
27315        #[allow(clippy::absurd_extreme_comparisons)]
27316        #[allow(unused_comparisons)]
27317        if __tmp.remaining() < Self::ENCODED_LEN {
27318            panic!(
27319                "buffer is too small (need {} bytes, but got {})",
27320                Self::ENCODED_LEN,
27321                __tmp.remaining(),
27322            )
27323        }
27324        __tmp.put_f32_le(self.p1x);
27325        __tmp.put_f32_le(self.p1y);
27326        __tmp.put_f32_le(self.p1z);
27327        __tmp.put_f32_le(self.p2x);
27328        __tmp.put_f32_le(self.p2y);
27329        __tmp.put_f32_le(self.p2z);
27330        __tmp.put_u8(self.target_system);
27331        __tmp.put_u8(self.target_component);
27332        __tmp.put_u8(self.frame as u8);
27333        if matches!(version, MavlinkVersion::V2) {
27334            let len = __tmp.len();
27335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27336        } else {
27337            __tmp.len()
27338        }
27339    }
27340}
27341#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27342#[doc = ""]
27343#[doc = "ID: 26"]
27344#[derive(Debug, Clone, PartialEq)]
27345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27347#[cfg_attr(feature = "ts", derive(TS))]
27348#[cfg_attr(feature = "ts", ts(export))]
27349pub struct SCALED_IMU_DATA {
27350    #[doc = "Timestamp (time since system boot)."]
27351    pub time_boot_ms: u32,
27352    #[doc = "X acceleration"]
27353    pub xacc: i16,
27354    #[doc = "Y acceleration"]
27355    pub yacc: i16,
27356    #[doc = "Z acceleration"]
27357    pub zacc: i16,
27358    #[doc = "Angular speed around X axis"]
27359    pub xgyro: i16,
27360    #[doc = "Angular speed around Y axis"]
27361    pub ygyro: i16,
27362    #[doc = "Angular speed around Z axis"]
27363    pub zgyro: i16,
27364    #[doc = "X Magnetic field"]
27365    pub xmag: i16,
27366    #[doc = "Y Magnetic field"]
27367    pub ymag: i16,
27368    #[doc = "Z Magnetic field"]
27369    pub zmag: i16,
27370    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27372    pub temperature: i16,
27373}
27374impl SCALED_IMU_DATA {
27375    pub const ENCODED_LEN: usize = 24usize;
27376    pub const DEFAULT: Self = Self {
27377        time_boot_ms: 0_u32,
27378        xacc: 0_i16,
27379        yacc: 0_i16,
27380        zacc: 0_i16,
27381        xgyro: 0_i16,
27382        ygyro: 0_i16,
27383        zgyro: 0_i16,
27384        xmag: 0_i16,
27385        ymag: 0_i16,
27386        zmag: 0_i16,
27387        temperature: 0_i16,
27388    };
27389    #[cfg(feature = "arbitrary")]
27390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27391        use arbitrary::{Arbitrary, Unstructured};
27392        let mut buf = [0u8; 1024];
27393        rng.fill_bytes(&mut buf);
27394        let mut unstructured = Unstructured::new(&buf);
27395        Self::arbitrary(&mut unstructured).unwrap_or_default()
27396    }
27397}
27398impl Default for SCALED_IMU_DATA {
27399    fn default() -> Self {
27400        Self::DEFAULT.clone()
27401    }
27402}
27403impl MessageData for SCALED_IMU_DATA {
27404    type Message = MavMessage;
27405    const ID: u32 = 26u32;
27406    const NAME: &'static str = "SCALED_IMU";
27407    const EXTRA_CRC: u8 = 170u8;
27408    const ENCODED_LEN: usize = 24usize;
27409    fn deser(
27410        _version: MavlinkVersion,
27411        __input: &[u8],
27412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27413        let avail_len = __input.len();
27414        let mut payload_buf = [0; Self::ENCODED_LEN];
27415        let mut buf = if avail_len < Self::ENCODED_LEN {
27416            payload_buf[0..avail_len].copy_from_slice(__input);
27417            Bytes::new(&payload_buf)
27418        } else {
27419            Bytes::new(__input)
27420        };
27421        let mut __struct = Self::default();
27422        __struct.time_boot_ms = buf.get_u32_le();
27423        __struct.xacc = buf.get_i16_le();
27424        __struct.yacc = buf.get_i16_le();
27425        __struct.zacc = buf.get_i16_le();
27426        __struct.xgyro = buf.get_i16_le();
27427        __struct.ygyro = buf.get_i16_le();
27428        __struct.zgyro = buf.get_i16_le();
27429        __struct.xmag = buf.get_i16_le();
27430        __struct.ymag = buf.get_i16_le();
27431        __struct.zmag = buf.get_i16_le();
27432        __struct.temperature = buf.get_i16_le();
27433        Ok(__struct)
27434    }
27435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27436        let mut __tmp = BytesMut::new(bytes);
27437        #[allow(clippy::absurd_extreme_comparisons)]
27438        #[allow(unused_comparisons)]
27439        if __tmp.remaining() < Self::ENCODED_LEN {
27440            panic!(
27441                "buffer is too small (need {} bytes, but got {})",
27442                Self::ENCODED_LEN,
27443                __tmp.remaining(),
27444            )
27445        }
27446        __tmp.put_u32_le(self.time_boot_ms);
27447        __tmp.put_i16_le(self.xacc);
27448        __tmp.put_i16_le(self.yacc);
27449        __tmp.put_i16_le(self.zacc);
27450        __tmp.put_i16_le(self.xgyro);
27451        __tmp.put_i16_le(self.ygyro);
27452        __tmp.put_i16_le(self.zgyro);
27453        __tmp.put_i16_le(self.xmag);
27454        __tmp.put_i16_le(self.ymag);
27455        __tmp.put_i16_le(self.zmag);
27456        if matches!(version, MavlinkVersion::V2) {
27457            __tmp.put_i16_le(self.temperature);
27458            let len = __tmp.len();
27459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27460        } else {
27461            __tmp.len()
27462        }
27463    }
27464}
27465#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27466#[doc = ""]
27467#[doc = "ID: 116"]
27468#[derive(Debug, Clone, PartialEq)]
27469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27471#[cfg_attr(feature = "ts", derive(TS))]
27472#[cfg_attr(feature = "ts", ts(export))]
27473pub struct SCALED_IMU2_DATA {
27474    #[doc = "Timestamp (time since system boot)."]
27475    pub time_boot_ms: u32,
27476    #[doc = "X acceleration"]
27477    pub xacc: i16,
27478    #[doc = "Y acceleration"]
27479    pub yacc: i16,
27480    #[doc = "Z acceleration"]
27481    pub zacc: i16,
27482    #[doc = "Angular speed around X axis"]
27483    pub xgyro: i16,
27484    #[doc = "Angular speed around Y axis"]
27485    pub ygyro: i16,
27486    #[doc = "Angular speed around Z axis"]
27487    pub zgyro: i16,
27488    #[doc = "X Magnetic field"]
27489    pub xmag: i16,
27490    #[doc = "Y Magnetic field"]
27491    pub ymag: i16,
27492    #[doc = "Z Magnetic field"]
27493    pub zmag: i16,
27494    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27495    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27496    pub temperature: i16,
27497}
27498impl SCALED_IMU2_DATA {
27499    pub const ENCODED_LEN: usize = 24usize;
27500    pub const DEFAULT: Self = Self {
27501        time_boot_ms: 0_u32,
27502        xacc: 0_i16,
27503        yacc: 0_i16,
27504        zacc: 0_i16,
27505        xgyro: 0_i16,
27506        ygyro: 0_i16,
27507        zgyro: 0_i16,
27508        xmag: 0_i16,
27509        ymag: 0_i16,
27510        zmag: 0_i16,
27511        temperature: 0_i16,
27512    };
27513    #[cfg(feature = "arbitrary")]
27514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27515        use arbitrary::{Arbitrary, Unstructured};
27516        let mut buf = [0u8; 1024];
27517        rng.fill_bytes(&mut buf);
27518        let mut unstructured = Unstructured::new(&buf);
27519        Self::arbitrary(&mut unstructured).unwrap_or_default()
27520    }
27521}
27522impl Default for SCALED_IMU2_DATA {
27523    fn default() -> Self {
27524        Self::DEFAULT.clone()
27525    }
27526}
27527impl MessageData for SCALED_IMU2_DATA {
27528    type Message = MavMessage;
27529    const ID: u32 = 116u32;
27530    const NAME: &'static str = "SCALED_IMU2";
27531    const EXTRA_CRC: u8 = 76u8;
27532    const ENCODED_LEN: usize = 24usize;
27533    fn deser(
27534        _version: MavlinkVersion,
27535        __input: &[u8],
27536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27537        let avail_len = __input.len();
27538        let mut payload_buf = [0; Self::ENCODED_LEN];
27539        let mut buf = if avail_len < Self::ENCODED_LEN {
27540            payload_buf[0..avail_len].copy_from_slice(__input);
27541            Bytes::new(&payload_buf)
27542        } else {
27543            Bytes::new(__input)
27544        };
27545        let mut __struct = Self::default();
27546        __struct.time_boot_ms = buf.get_u32_le();
27547        __struct.xacc = buf.get_i16_le();
27548        __struct.yacc = buf.get_i16_le();
27549        __struct.zacc = buf.get_i16_le();
27550        __struct.xgyro = buf.get_i16_le();
27551        __struct.ygyro = buf.get_i16_le();
27552        __struct.zgyro = buf.get_i16_le();
27553        __struct.xmag = buf.get_i16_le();
27554        __struct.ymag = buf.get_i16_le();
27555        __struct.zmag = buf.get_i16_le();
27556        __struct.temperature = buf.get_i16_le();
27557        Ok(__struct)
27558    }
27559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27560        let mut __tmp = BytesMut::new(bytes);
27561        #[allow(clippy::absurd_extreme_comparisons)]
27562        #[allow(unused_comparisons)]
27563        if __tmp.remaining() < Self::ENCODED_LEN {
27564            panic!(
27565                "buffer is too small (need {} bytes, but got {})",
27566                Self::ENCODED_LEN,
27567                __tmp.remaining(),
27568            )
27569        }
27570        __tmp.put_u32_le(self.time_boot_ms);
27571        __tmp.put_i16_le(self.xacc);
27572        __tmp.put_i16_le(self.yacc);
27573        __tmp.put_i16_le(self.zacc);
27574        __tmp.put_i16_le(self.xgyro);
27575        __tmp.put_i16_le(self.ygyro);
27576        __tmp.put_i16_le(self.zgyro);
27577        __tmp.put_i16_le(self.xmag);
27578        __tmp.put_i16_le(self.ymag);
27579        __tmp.put_i16_le(self.zmag);
27580        if matches!(version, MavlinkVersion::V2) {
27581            __tmp.put_i16_le(self.temperature);
27582            let len = __tmp.len();
27583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27584        } else {
27585            __tmp.len()
27586        }
27587    }
27588}
27589#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27590#[doc = ""]
27591#[doc = "ID: 129"]
27592#[derive(Debug, Clone, PartialEq)]
27593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27595#[cfg_attr(feature = "ts", derive(TS))]
27596#[cfg_attr(feature = "ts", ts(export))]
27597pub struct SCALED_IMU3_DATA {
27598    #[doc = "Timestamp (time since system boot)."]
27599    pub time_boot_ms: u32,
27600    #[doc = "X acceleration"]
27601    pub xacc: i16,
27602    #[doc = "Y acceleration"]
27603    pub yacc: i16,
27604    #[doc = "Z acceleration"]
27605    pub zacc: i16,
27606    #[doc = "Angular speed around X axis"]
27607    pub xgyro: i16,
27608    #[doc = "Angular speed around Y axis"]
27609    pub ygyro: i16,
27610    #[doc = "Angular speed around Z axis"]
27611    pub zgyro: i16,
27612    #[doc = "X Magnetic field"]
27613    pub xmag: i16,
27614    #[doc = "Y Magnetic field"]
27615    pub ymag: i16,
27616    #[doc = "Z Magnetic field"]
27617    pub zmag: i16,
27618    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27620    pub temperature: i16,
27621}
27622impl SCALED_IMU3_DATA {
27623    pub const ENCODED_LEN: usize = 24usize;
27624    pub const DEFAULT: Self = Self {
27625        time_boot_ms: 0_u32,
27626        xacc: 0_i16,
27627        yacc: 0_i16,
27628        zacc: 0_i16,
27629        xgyro: 0_i16,
27630        ygyro: 0_i16,
27631        zgyro: 0_i16,
27632        xmag: 0_i16,
27633        ymag: 0_i16,
27634        zmag: 0_i16,
27635        temperature: 0_i16,
27636    };
27637    #[cfg(feature = "arbitrary")]
27638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27639        use arbitrary::{Arbitrary, Unstructured};
27640        let mut buf = [0u8; 1024];
27641        rng.fill_bytes(&mut buf);
27642        let mut unstructured = Unstructured::new(&buf);
27643        Self::arbitrary(&mut unstructured).unwrap_or_default()
27644    }
27645}
27646impl Default for SCALED_IMU3_DATA {
27647    fn default() -> Self {
27648        Self::DEFAULT.clone()
27649    }
27650}
27651impl MessageData for SCALED_IMU3_DATA {
27652    type Message = MavMessage;
27653    const ID: u32 = 129u32;
27654    const NAME: &'static str = "SCALED_IMU3";
27655    const EXTRA_CRC: u8 = 46u8;
27656    const ENCODED_LEN: usize = 24usize;
27657    fn deser(
27658        _version: MavlinkVersion,
27659        __input: &[u8],
27660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27661        let avail_len = __input.len();
27662        let mut payload_buf = [0; Self::ENCODED_LEN];
27663        let mut buf = if avail_len < Self::ENCODED_LEN {
27664            payload_buf[0..avail_len].copy_from_slice(__input);
27665            Bytes::new(&payload_buf)
27666        } else {
27667            Bytes::new(__input)
27668        };
27669        let mut __struct = Self::default();
27670        __struct.time_boot_ms = buf.get_u32_le();
27671        __struct.xacc = buf.get_i16_le();
27672        __struct.yacc = buf.get_i16_le();
27673        __struct.zacc = buf.get_i16_le();
27674        __struct.xgyro = buf.get_i16_le();
27675        __struct.ygyro = buf.get_i16_le();
27676        __struct.zgyro = buf.get_i16_le();
27677        __struct.xmag = buf.get_i16_le();
27678        __struct.ymag = buf.get_i16_le();
27679        __struct.zmag = buf.get_i16_le();
27680        __struct.temperature = buf.get_i16_le();
27681        Ok(__struct)
27682    }
27683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27684        let mut __tmp = BytesMut::new(bytes);
27685        #[allow(clippy::absurd_extreme_comparisons)]
27686        #[allow(unused_comparisons)]
27687        if __tmp.remaining() < Self::ENCODED_LEN {
27688            panic!(
27689                "buffer is too small (need {} bytes, but got {})",
27690                Self::ENCODED_LEN,
27691                __tmp.remaining(),
27692            )
27693        }
27694        __tmp.put_u32_le(self.time_boot_ms);
27695        __tmp.put_i16_le(self.xacc);
27696        __tmp.put_i16_le(self.yacc);
27697        __tmp.put_i16_le(self.zacc);
27698        __tmp.put_i16_le(self.xgyro);
27699        __tmp.put_i16_le(self.ygyro);
27700        __tmp.put_i16_le(self.zgyro);
27701        __tmp.put_i16_le(self.xmag);
27702        __tmp.put_i16_le(self.ymag);
27703        __tmp.put_i16_le(self.zmag);
27704        if matches!(version, MavlinkVersion::V2) {
27705            __tmp.put_i16_le(self.temperature);
27706            let len = __tmp.len();
27707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27708        } else {
27709            __tmp.len()
27710        }
27711    }
27712}
27713#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27714#[doc = ""]
27715#[doc = "ID: 29"]
27716#[derive(Debug, Clone, PartialEq)]
27717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27719#[cfg_attr(feature = "ts", derive(TS))]
27720#[cfg_attr(feature = "ts", ts(export))]
27721pub struct SCALED_PRESSURE_DATA {
27722    #[doc = "Timestamp (time since system boot)."]
27723    pub time_boot_ms: u32,
27724    #[doc = "Absolute pressure"]
27725    pub press_abs: f32,
27726    #[doc = "Differential pressure 1"]
27727    pub press_diff: f32,
27728    #[doc = "Absolute pressure temperature"]
27729    pub temperature: i16,
27730    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27731    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27732    pub temperature_press_diff: i16,
27733}
27734impl SCALED_PRESSURE_DATA {
27735    pub const ENCODED_LEN: usize = 16usize;
27736    pub const DEFAULT: Self = Self {
27737        time_boot_ms: 0_u32,
27738        press_abs: 0.0_f32,
27739        press_diff: 0.0_f32,
27740        temperature: 0_i16,
27741        temperature_press_diff: 0_i16,
27742    };
27743    #[cfg(feature = "arbitrary")]
27744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27745        use arbitrary::{Arbitrary, Unstructured};
27746        let mut buf = [0u8; 1024];
27747        rng.fill_bytes(&mut buf);
27748        let mut unstructured = Unstructured::new(&buf);
27749        Self::arbitrary(&mut unstructured).unwrap_or_default()
27750    }
27751}
27752impl Default for SCALED_PRESSURE_DATA {
27753    fn default() -> Self {
27754        Self::DEFAULT.clone()
27755    }
27756}
27757impl MessageData for SCALED_PRESSURE_DATA {
27758    type Message = MavMessage;
27759    const ID: u32 = 29u32;
27760    const NAME: &'static str = "SCALED_PRESSURE";
27761    const EXTRA_CRC: u8 = 115u8;
27762    const ENCODED_LEN: usize = 16usize;
27763    fn deser(
27764        _version: MavlinkVersion,
27765        __input: &[u8],
27766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27767        let avail_len = __input.len();
27768        let mut payload_buf = [0; Self::ENCODED_LEN];
27769        let mut buf = if avail_len < Self::ENCODED_LEN {
27770            payload_buf[0..avail_len].copy_from_slice(__input);
27771            Bytes::new(&payload_buf)
27772        } else {
27773            Bytes::new(__input)
27774        };
27775        let mut __struct = Self::default();
27776        __struct.time_boot_ms = buf.get_u32_le();
27777        __struct.press_abs = buf.get_f32_le();
27778        __struct.press_diff = buf.get_f32_le();
27779        __struct.temperature = buf.get_i16_le();
27780        __struct.temperature_press_diff = buf.get_i16_le();
27781        Ok(__struct)
27782    }
27783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27784        let mut __tmp = BytesMut::new(bytes);
27785        #[allow(clippy::absurd_extreme_comparisons)]
27786        #[allow(unused_comparisons)]
27787        if __tmp.remaining() < Self::ENCODED_LEN {
27788            panic!(
27789                "buffer is too small (need {} bytes, but got {})",
27790                Self::ENCODED_LEN,
27791                __tmp.remaining(),
27792            )
27793        }
27794        __tmp.put_u32_le(self.time_boot_ms);
27795        __tmp.put_f32_le(self.press_abs);
27796        __tmp.put_f32_le(self.press_diff);
27797        __tmp.put_i16_le(self.temperature);
27798        if matches!(version, MavlinkVersion::V2) {
27799            __tmp.put_i16_le(self.temperature_press_diff);
27800            let len = __tmp.len();
27801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27802        } else {
27803            __tmp.len()
27804        }
27805    }
27806}
27807#[doc = "Barometer readings for 2nd barometer."]
27808#[doc = ""]
27809#[doc = "ID: 137"]
27810#[derive(Debug, Clone, PartialEq)]
27811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27813#[cfg_attr(feature = "ts", derive(TS))]
27814#[cfg_attr(feature = "ts", ts(export))]
27815pub struct SCALED_PRESSURE2_DATA {
27816    #[doc = "Timestamp (time since system boot)."]
27817    pub time_boot_ms: u32,
27818    #[doc = "Absolute pressure"]
27819    pub press_abs: f32,
27820    #[doc = "Differential pressure"]
27821    pub press_diff: f32,
27822    #[doc = "Absolute pressure temperature"]
27823    pub temperature: i16,
27824    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27825    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27826    pub temperature_press_diff: i16,
27827}
27828impl SCALED_PRESSURE2_DATA {
27829    pub const ENCODED_LEN: usize = 16usize;
27830    pub const DEFAULT: Self = Self {
27831        time_boot_ms: 0_u32,
27832        press_abs: 0.0_f32,
27833        press_diff: 0.0_f32,
27834        temperature: 0_i16,
27835        temperature_press_diff: 0_i16,
27836    };
27837    #[cfg(feature = "arbitrary")]
27838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27839        use arbitrary::{Arbitrary, Unstructured};
27840        let mut buf = [0u8; 1024];
27841        rng.fill_bytes(&mut buf);
27842        let mut unstructured = Unstructured::new(&buf);
27843        Self::arbitrary(&mut unstructured).unwrap_or_default()
27844    }
27845}
27846impl Default for SCALED_PRESSURE2_DATA {
27847    fn default() -> Self {
27848        Self::DEFAULT.clone()
27849    }
27850}
27851impl MessageData for SCALED_PRESSURE2_DATA {
27852    type Message = MavMessage;
27853    const ID: u32 = 137u32;
27854    const NAME: &'static str = "SCALED_PRESSURE2";
27855    const EXTRA_CRC: u8 = 195u8;
27856    const ENCODED_LEN: usize = 16usize;
27857    fn deser(
27858        _version: MavlinkVersion,
27859        __input: &[u8],
27860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27861        let avail_len = __input.len();
27862        let mut payload_buf = [0; Self::ENCODED_LEN];
27863        let mut buf = if avail_len < Self::ENCODED_LEN {
27864            payload_buf[0..avail_len].copy_from_slice(__input);
27865            Bytes::new(&payload_buf)
27866        } else {
27867            Bytes::new(__input)
27868        };
27869        let mut __struct = Self::default();
27870        __struct.time_boot_ms = buf.get_u32_le();
27871        __struct.press_abs = buf.get_f32_le();
27872        __struct.press_diff = buf.get_f32_le();
27873        __struct.temperature = buf.get_i16_le();
27874        __struct.temperature_press_diff = buf.get_i16_le();
27875        Ok(__struct)
27876    }
27877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27878        let mut __tmp = BytesMut::new(bytes);
27879        #[allow(clippy::absurd_extreme_comparisons)]
27880        #[allow(unused_comparisons)]
27881        if __tmp.remaining() < Self::ENCODED_LEN {
27882            panic!(
27883                "buffer is too small (need {} bytes, but got {})",
27884                Self::ENCODED_LEN,
27885                __tmp.remaining(),
27886            )
27887        }
27888        __tmp.put_u32_le(self.time_boot_ms);
27889        __tmp.put_f32_le(self.press_abs);
27890        __tmp.put_f32_le(self.press_diff);
27891        __tmp.put_i16_le(self.temperature);
27892        if matches!(version, MavlinkVersion::V2) {
27893            __tmp.put_i16_le(self.temperature_press_diff);
27894            let len = __tmp.len();
27895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27896        } else {
27897            __tmp.len()
27898        }
27899    }
27900}
27901#[doc = "Barometer readings for 3rd barometer."]
27902#[doc = ""]
27903#[doc = "ID: 143"]
27904#[derive(Debug, Clone, PartialEq)]
27905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27907#[cfg_attr(feature = "ts", derive(TS))]
27908#[cfg_attr(feature = "ts", ts(export))]
27909pub struct SCALED_PRESSURE3_DATA {
27910    #[doc = "Timestamp (time since system boot)."]
27911    pub time_boot_ms: u32,
27912    #[doc = "Absolute pressure"]
27913    pub press_abs: f32,
27914    #[doc = "Differential pressure"]
27915    pub press_diff: f32,
27916    #[doc = "Absolute pressure temperature"]
27917    pub temperature: i16,
27918    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27919    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27920    pub temperature_press_diff: i16,
27921}
27922impl SCALED_PRESSURE3_DATA {
27923    pub const ENCODED_LEN: usize = 16usize;
27924    pub const DEFAULT: Self = Self {
27925        time_boot_ms: 0_u32,
27926        press_abs: 0.0_f32,
27927        press_diff: 0.0_f32,
27928        temperature: 0_i16,
27929        temperature_press_diff: 0_i16,
27930    };
27931    #[cfg(feature = "arbitrary")]
27932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27933        use arbitrary::{Arbitrary, Unstructured};
27934        let mut buf = [0u8; 1024];
27935        rng.fill_bytes(&mut buf);
27936        let mut unstructured = Unstructured::new(&buf);
27937        Self::arbitrary(&mut unstructured).unwrap_or_default()
27938    }
27939}
27940impl Default for SCALED_PRESSURE3_DATA {
27941    fn default() -> Self {
27942        Self::DEFAULT.clone()
27943    }
27944}
27945impl MessageData for SCALED_PRESSURE3_DATA {
27946    type Message = MavMessage;
27947    const ID: u32 = 143u32;
27948    const NAME: &'static str = "SCALED_PRESSURE3";
27949    const EXTRA_CRC: u8 = 131u8;
27950    const ENCODED_LEN: usize = 16usize;
27951    fn deser(
27952        _version: MavlinkVersion,
27953        __input: &[u8],
27954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27955        let avail_len = __input.len();
27956        let mut payload_buf = [0; Self::ENCODED_LEN];
27957        let mut buf = if avail_len < Self::ENCODED_LEN {
27958            payload_buf[0..avail_len].copy_from_slice(__input);
27959            Bytes::new(&payload_buf)
27960        } else {
27961            Bytes::new(__input)
27962        };
27963        let mut __struct = Self::default();
27964        __struct.time_boot_ms = buf.get_u32_le();
27965        __struct.press_abs = buf.get_f32_le();
27966        __struct.press_diff = buf.get_f32_le();
27967        __struct.temperature = buf.get_i16_le();
27968        __struct.temperature_press_diff = buf.get_i16_le();
27969        Ok(__struct)
27970    }
27971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27972        let mut __tmp = BytesMut::new(bytes);
27973        #[allow(clippy::absurd_extreme_comparisons)]
27974        #[allow(unused_comparisons)]
27975        if __tmp.remaining() < Self::ENCODED_LEN {
27976            panic!(
27977                "buffer is too small (need {} bytes, but got {})",
27978                Self::ENCODED_LEN,
27979                __tmp.remaining(),
27980            )
27981        }
27982        __tmp.put_u32_le(self.time_boot_ms);
27983        __tmp.put_f32_le(self.press_abs);
27984        __tmp.put_f32_le(self.press_diff);
27985        __tmp.put_i16_le(self.temperature);
27986        if matches!(version, MavlinkVersion::V2) {
27987            __tmp.put_i16_le(self.temperature_press_diff);
27988            let len = __tmp.len();
27989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27990        } else {
27991            __tmp.len()
27992        }
27993    }
27994}
27995#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27996#[doc = ""]
27997#[doc = "ID: 126"]
27998#[derive(Debug, Clone, PartialEq)]
27999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28001#[cfg_attr(feature = "ts", derive(TS))]
28002#[cfg_attr(feature = "ts", ts(export))]
28003pub struct SERIAL_CONTROL_DATA {
28004    #[doc = "Baudrate of transfer. Zero means no change."]
28005    pub baudrate: u32,
28006    #[doc = "Timeout for reply data"]
28007    pub timeout: u16,
28008    #[doc = "Serial control device type."]
28009    pub device: SerialControlDev,
28010    #[doc = "Bitmap of serial control flags."]
28011    pub flags: SerialControlFlag,
28012    #[doc = "how many bytes in this transfer"]
28013    pub count: u8,
28014    #[doc = "serial data"]
28015    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28016    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28017    pub data: [u8; 70],
28018    #[doc = "System ID"]
28019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28020    pub target_system: u8,
28021    #[doc = "Component ID"]
28022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28023    pub target_component: u8,
28024}
28025impl SERIAL_CONTROL_DATA {
28026    pub const ENCODED_LEN: usize = 81usize;
28027    pub const DEFAULT: Self = Self {
28028        baudrate: 0_u32,
28029        timeout: 0_u16,
28030        device: SerialControlDev::DEFAULT,
28031        flags: SerialControlFlag::DEFAULT,
28032        count: 0_u8,
28033        data: [0_u8; 70usize],
28034        target_system: 0_u8,
28035        target_component: 0_u8,
28036    };
28037    #[cfg(feature = "arbitrary")]
28038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28039        use arbitrary::{Arbitrary, Unstructured};
28040        let mut buf = [0u8; 1024];
28041        rng.fill_bytes(&mut buf);
28042        let mut unstructured = Unstructured::new(&buf);
28043        Self::arbitrary(&mut unstructured).unwrap_or_default()
28044    }
28045}
28046impl Default for SERIAL_CONTROL_DATA {
28047    fn default() -> Self {
28048        Self::DEFAULT.clone()
28049    }
28050}
28051impl MessageData for SERIAL_CONTROL_DATA {
28052    type Message = MavMessage;
28053    const ID: u32 = 126u32;
28054    const NAME: &'static str = "SERIAL_CONTROL";
28055    const EXTRA_CRC: u8 = 220u8;
28056    const ENCODED_LEN: usize = 81usize;
28057    fn deser(
28058        _version: MavlinkVersion,
28059        __input: &[u8],
28060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28061        let avail_len = __input.len();
28062        let mut payload_buf = [0; Self::ENCODED_LEN];
28063        let mut buf = if avail_len < Self::ENCODED_LEN {
28064            payload_buf[0..avail_len].copy_from_slice(__input);
28065            Bytes::new(&payload_buf)
28066        } else {
28067            Bytes::new(__input)
28068        };
28069        let mut __struct = Self::default();
28070        __struct.baudrate = buf.get_u32_le();
28071        __struct.timeout = buf.get_u16_le();
28072        let tmp = buf.get_u8();
28073        __struct.device =
28074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28075                enum_type: "SerialControlDev",
28076                value: tmp as u32,
28077            })?;
28078        let tmp = buf.get_u8();
28079        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
28080            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28081                flag_type: "SerialControlFlag",
28082                value: tmp as u32,
28083            })?;
28084        __struct.count = buf.get_u8();
28085        for v in &mut __struct.data {
28086            let val = buf.get_u8();
28087            *v = val;
28088        }
28089        __struct.target_system = buf.get_u8();
28090        __struct.target_component = buf.get_u8();
28091        Ok(__struct)
28092    }
28093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28094        let mut __tmp = BytesMut::new(bytes);
28095        #[allow(clippy::absurd_extreme_comparisons)]
28096        #[allow(unused_comparisons)]
28097        if __tmp.remaining() < Self::ENCODED_LEN {
28098            panic!(
28099                "buffer is too small (need {} bytes, but got {})",
28100                Self::ENCODED_LEN,
28101                __tmp.remaining(),
28102            )
28103        }
28104        __tmp.put_u32_le(self.baudrate);
28105        __tmp.put_u16_le(self.timeout);
28106        __tmp.put_u8(self.device as u8);
28107        __tmp.put_u8(self.flags.bits());
28108        __tmp.put_u8(self.count);
28109        for val in &self.data {
28110            __tmp.put_u8(*val);
28111        }
28112        if matches!(version, MavlinkVersion::V2) {
28113            __tmp.put_u8(self.target_system);
28114            __tmp.put_u8(self.target_component);
28115            let len = __tmp.len();
28116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28117        } else {
28118            __tmp.len()
28119        }
28120    }
28121}
28122#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F13: format."]
28123#[doc = ""]
28124#[doc = "ID: 177"]
28125#[derive(Debug, Clone, PartialEq)]
28126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28128#[cfg_attr(feature = "ts", derive(TS))]
28129#[cfg_attr(feature = "ts", ts(export))]
28130pub struct SERIAL_UDB_EXTRA_F13_DATA {
28131    #[doc = "Serial UDB Extra MP Origin Latitude"]
28132    pub sue_lat_origin: i32,
28133    #[doc = "Serial UDB Extra MP Origin Longitude"]
28134    pub sue_lon_origin: i32,
28135    #[doc = "Serial UDB Extra MP Origin Altitude Above Sea Level"]
28136    pub sue_alt_origin: i32,
28137    #[doc = "Serial UDB Extra GPS Week Number"]
28138    pub sue_week_no: i16,
28139}
28140impl SERIAL_UDB_EXTRA_F13_DATA {
28141    pub const ENCODED_LEN: usize = 14usize;
28142    pub const DEFAULT: Self = Self {
28143        sue_lat_origin: 0_i32,
28144        sue_lon_origin: 0_i32,
28145        sue_alt_origin: 0_i32,
28146        sue_week_no: 0_i16,
28147    };
28148    #[cfg(feature = "arbitrary")]
28149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28150        use arbitrary::{Arbitrary, Unstructured};
28151        let mut buf = [0u8; 1024];
28152        rng.fill_bytes(&mut buf);
28153        let mut unstructured = Unstructured::new(&buf);
28154        Self::arbitrary(&mut unstructured).unwrap_or_default()
28155    }
28156}
28157impl Default for SERIAL_UDB_EXTRA_F13_DATA {
28158    fn default() -> Self {
28159        Self::DEFAULT.clone()
28160    }
28161}
28162impl MessageData for SERIAL_UDB_EXTRA_F13_DATA {
28163    type Message = MavMessage;
28164    const ID: u32 = 177u32;
28165    const NAME: &'static str = "SERIAL_UDB_EXTRA_F13";
28166    const EXTRA_CRC: u8 = 249u8;
28167    const ENCODED_LEN: usize = 14usize;
28168    fn deser(
28169        _version: MavlinkVersion,
28170        __input: &[u8],
28171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28172        let avail_len = __input.len();
28173        let mut payload_buf = [0; Self::ENCODED_LEN];
28174        let mut buf = if avail_len < Self::ENCODED_LEN {
28175            payload_buf[0..avail_len].copy_from_slice(__input);
28176            Bytes::new(&payload_buf)
28177        } else {
28178            Bytes::new(__input)
28179        };
28180        let mut __struct = Self::default();
28181        __struct.sue_lat_origin = buf.get_i32_le();
28182        __struct.sue_lon_origin = buf.get_i32_le();
28183        __struct.sue_alt_origin = buf.get_i32_le();
28184        __struct.sue_week_no = buf.get_i16_le();
28185        Ok(__struct)
28186    }
28187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28188        let mut __tmp = BytesMut::new(bytes);
28189        #[allow(clippy::absurd_extreme_comparisons)]
28190        #[allow(unused_comparisons)]
28191        if __tmp.remaining() < Self::ENCODED_LEN {
28192            panic!(
28193                "buffer is too small (need {} bytes, but got {})",
28194                Self::ENCODED_LEN,
28195                __tmp.remaining(),
28196            )
28197        }
28198        __tmp.put_i32_le(self.sue_lat_origin);
28199        __tmp.put_i32_le(self.sue_lon_origin);
28200        __tmp.put_i32_le(self.sue_alt_origin);
28201        __tmp.put_i16_le(self.sue_week_no);
28202        if matches!(version, MavlinkVersion::V2) {
28203            let len = __tmp.len();
28204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28205        } else {
28206            __tmp.len()
28207        }
28208    }
28209}
28210#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F14: format."]
28211#[doc = ""]
28212#[doc = "ID: 178"]
28213#[derive(Debug, Clone, PartialEq)]
28214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28216#[cfg_attr(feature = "ts", derive(TS))]
28217#[cfg_attr(feature = "ts", ts(export))]
28218pub struct SERIAL_UDB_EXTRA_F14_DATA {
28219    #[doc = "Serial UDB Extra Type Program Address of Last Trap"]
28220    pub sue_TRAP_SOURCE: u32,
28221    #[doc = "Serial UDB Extra Reboot Register of DSPIC"]
28222    pub sue_RCON: i16,
28223    #[doc = "Serial UDB Extra  Last dspic Trap Flags"]
28224    pub sue_TRAP_FLAGS: i16,
28225    #[doc = "Serial UDB Extra Number of Ocillator Failures"]
28226    pub sue_osc_fail_count: i16,
28227    #[doc = "Serial UDB Extra Wind Estimation Enabled"]
28228    pub sue_WIND_ESTIMATION: u8,
28229    #[doc = "Serial UDB Extra Type of GPS Unit"]
28230    pub sue_GPS_TYPE: u8,
28231    #[doc = "Serial UDB Extra Dead Reckoning Enabled"]
28232    pub sue_DR: u8,
28233    #[doc = "Serial UDB Extra Type of UDB Hardware"]
28234    pub sue_BOARD_TYPE: u8,
28235    #[doc = "Serial UDB Extra Type of Airframe"]
28236    pub sue_AIRFRAME: u8,
28237    #[doc = "Serial UDB Extra UDB Internal Clock Configuration"]
28238    pub sue_CLOCK_CONFIG: u8,
28239    #[doc = "Serial UDB Extra Type of Flight Plan"]
28240    pub sue_FLIGHT_PLAN_TYPE: u8,
28241}
28242impl SERIAL_UDB_EXTRA_F14_DATA {
28243    pub const ENCODED_LEN: usize = 17usize;
28244    pub const DEFAULT: Self = Self {
28245        sue_TRAP_SOURCE: 0_u32,
28246        sue_RCON: 0_i16,
28247        sue_TRAP_FLAGS: 0_i16,
28248        sue_osc_fail_count: 0_i16,
28249        sue_WIND_ESTIMATION: 0_u8,
28250        sue_GPS_TYPE: 0_u8,
28251        sue_DR: 0_u8,
28252        sue_BOARD_TYPE: 0_u8,
28253        sue_AIRFRAME: 0_u8,
28254        sue_CLOCK_CONFIG: 0_u8,
28255        sue_FLIGHT_PLAN_TYPE: 0_u8,
28256    };
28257    #[cfg(feature = "arbitrary")]
28258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28259        use arbitrary::{Arbitrary, Unstructured};
28260        let mut buf = [0u8; 1024];
28261        rng.fill_bytes(&mut buf);
28262        let mut unstructured = Unstructured::new(&buf);
28263        Self::arbitrary(&mut unstructured).unwrap_or_default()
28264    }
28265}
28266impl Default for SERIAL_UDB_EXTRA_F14_DATA {
28267    fn default() -> Self {
28268        Self::DEFAULT.clone()
28269    }
28270}
28271impl MessageData for SERIAL_UDB_EXTRA_F14_DATA {
28272    type Message = MavMessage;
28273    const ID: u32 = 178u32;
28274    const NAME: &'static str = "SERIAL_UDB_EXTRA_F14";
28275    const EXTRA_CRC: u8 = 123u8;
28276    const ENCODED_LEN: usize = 17usize;
28277    fn deser(
28278        _version: MavlinkVersion,
28279        __input: &[u8],
28280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28281        let avail_len = __input.len();
28282        let mut payload_buf = [0; Self::ENCODED_LEN];
28283        let mut buf = if avail_len < Self::ENCODED_LEN {
28284            payload_buf[0..avail_len].copy_from_slice(__input);
28285            Bytes::new(&payload_buf)
28286        } else {
28287            Bytes::new(__input)
28288        };
28289        let mut __struct = Self::default();
28290        __struct.sue_TRAP_SOURCE = buf.get_u32_le();
28291        __struct.sue_RCON = buf.get_i16_le();
28292        __struct.sue_TRAP_FLAGS = buf.get_i16_le();
28293        __struct.sue_osc_fail_count = buf.get_i16_le();
28294        __struct.sue_WIND_ESTIMATION = buf.get_u8();
28295        __struct.sue_GPS_TYPE = buf.get_u8();
28296        __struct.sue_DR = buf.get_u8();
28297        __struct.sue_BOARD_TYPE = buf.get_u8();
28298        __struct.sue_AIRFRAME = buf.get_u8();
28299        __struct.sue_CLOCK_CONFIG = buf.get_u8();
28300        __struct.sue_FLIGHT_PLAN_TYPE = buf.get_u8();
28301        Ok(__struct)
28302    }
28303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28304        let mut __tmp = BytesMut::new(bytes);
28305        #[allow(clippy::absurd_extreme_comparisons)]
28306        #[allow(unused_comparisons)]
28307        if __tmp.remaining() < Self::ENCODED_LEN {
28308            panic!(
28309                "buffer is too small (need {} bytes, but got {})",
28310                Self::ENCODED_LEN,
28311                __tmp.remaining(),
28312            )
28313        }
28314        __tmp.put_u32_le(self.sue_TRAP_SOURCE);
28315        __tmp.put_i16_le(self.sue_RCON);
28316        __tmp.put_i16_le(self.sue_TRAP_FLAGS);
28317        __tmp.put_i16_le(self.sue_osc_fail_count);
28318        __tmp.put_u8(self.sue_WIND_ESTIMATION);
28319        __tmp.put_u8(self.sue_GPS_TYPE);
28320        __tmp.put_u8(self.sue_DR);
28321        __tmp.put_u8(self.sue_BOARD_TYPE);
28322        __tmp.put_u8(self.sue_AIRFRAME);
28323        __tmp.put_u8(self.sue_CLOCK_CONFIG);
28324        __tmp.put_u8(self.sue_FLIGHT_PLAN_TYPE);
28325        if matches!(version, MavlinkVersion::V2) {
28326            let len = __tmp.len();
28327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28328        } else {
28329            __tmp.len()
28330        }
28331    }
28332}
28333#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F15 format."]
28334#[doc = ""]
28335#[doc = "ID: 179"]
28336#[derive(Debug, Clone, PartialEq)]
28337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28339#[cfg_attr(feature = "ts", derive(TS))]
28340#[cfg_attr(feature = "ts", ts(export))]
28341pub struct SERIAL_UDB_EXTRA_F15_DATA {
28342    #[doc = "Serial UDB Extra Model Name Of Vehicle"]
28343    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28344    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28345    pub sue_ID_VEHICLE_MODEL_NAME: [u8; 40],
28346    #[doc = "Serial UDB Extra Registraton Number of Vehicle"]
28347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28349    pub sue_ID_VEHICLE_REGISTRATION: [u8; 20],
28350}
28351impl SERIAL_UDB_EXTRA_F15_DATA {
28352    pub const ENCODED_LEN: usize = 60usize;
28353    pub const DEFAULT: Self = Self {
28354        sue_ID_VEHICLE_MODEL_NAME: [0_u8; 40usize],
28355        sue_ID_VEHICLE_REGISTRATION: [0_u8; 20usize],
28356    };
28357    #[cfg(feature = "arbitrary")]
28358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28359        use arbitrary::{Arbitrary, Unstructured};
28360        let mut buf = [0u8; 1024];
28361        rng.fill_bytes(&mut buf);
28362        let mut unstructured = Unstructured::new(&buf);
28363        Self::arbitrary(&mut unstructured).unwrap_or_default()
28364    }
28365}
28366impl Default for SERIAL_UDB_EXTRA_F15_DATA {
28367    fn default() -> Self {
28368        Self::DEFAULT.clone()
28369    }
28370}
28371impl MessageData for SERIAL_UDB_EXTRA_F15_DATA {
28372    type Message = MavMessage;
28373    const ID: u32 = 179u32;
28374    const NAME: &'static str = "SERIAL_UDB_EXTRA_F15";
28375    const EXTRA_CRC: u8 = 7u8;
28376    const ENCODED_LEN: usize = 60usize;
28377    fn deser(
28378        _version: MavlinkVersion,
28379        __input: &[u8],
28380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28381        let avail_len = __input.len();
28382        let mut payload_buf = [0; Self::ENCODED_LEN];
28383        let mut buf = if avail_len < Self::ENCODED_LEN {
28384            payload_buf[0..avail_len].copy_from_slice(__input);
28385            Bytes::new(&payload_buf)
28386        } else {
28387            Bytes::new(__input)
28388        };
28389        let mut __struct = Self::default();
28390        for v in &mut __struct.sue_ID_VEHICLE_MODEL_NAME {
28391            let val = buf.get_u8();
28392            *v = val;
28393        }
28394        for v in &mut __struct.sue_ID_VEHICLE_REGISTRATION {
28395            let val = buf.get_u8();
28396            *v = val;
28397        }
28398        Ok(__struct)
28399    }
28400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28401        let mut __tmp = BytesMut::new(bytes);
28402        #[allow(clippy::absurd_extreme_comparisons)]
28403        #[allow(unused_comparisons)]
28404        if __tmp.remaining() < Self::ENCODED_LEN {
28405            panic!(
28406                "buffer is too small (need {} bytes, but got {})",
28407                Self::ENCODED_LEN,
28408                __tmp.remaining(),
28409            )
28410        }
28411        for val in &self.sue_ID_VEHICLE_MODEL_NAME {
28412            __tmp.put_u8(*val);
28413        }
28414        for val in &self.sue_ID_VEHICLE_REGISTRATION {
28415            __tmp.put_u8(*val);
28416        }
28417        if matches!(version, MavlinkVersion::V2) {
28418            let len = __tmp.len();
28419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28420        } else {
28421            __tmp.len()
28422        }
28423    }
28424}
28425#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F16 format."]
28426#[doc = ""]
28427#[doc = "ID: 180"]
28428#[derive(Debug, Clone, PartialEq)]
28429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28431#[cfg_attr(feature = "ts", derive(TS))]
28432#[cfg_attr(feature = "ts", ts(export))]
28433pub struct SERIAL_UDB_EXTRA_F16_DATA {
28434    #[doc = "Serial UDB Extra Name of Expected Lead Pilot"]
28435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28437    pub sue_ID_LEAD_PILOT: [u8; 40],
28438    #[doc = "Serial UDB Extra URL of Lead Pilot or Team"]
28439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28440    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28441    pub sue_ID_DIY_DRONES_URL: [u8; 70],
28442}
28443impl SERIAL_UDB_EXTRA_F16_DATA {
28444    pub const ENCODED_LEN: usize = 110usize;
28445    pub const DEFAULT: Self = Self {
28446        sue_ID_LEAD_PILOT: [0_u8; 40usize],
28447        sue_ID_DIY_DRONES_URL: [0_u8; 70usize],
28448    };
28449    #[cfg(feature = "arbitrary")]
28450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28451        use arbitrary::{Arbitrary, Unstructured};
28452        let mut buf = [0u8; 1024];
28453        rng.fill_bytes(&mut buf);
28454        let mut unstructured = Unstructured::new(&buf);
28455        Self::arbitrary(&mut unstructured).unwrap_or_default()
28456    }
28457}
28458impl Default for SERIAL_UDB_EXTRA_F16_DATA {
28459    fn default() -> Self {
28460        Self::DEFAULT.clone()
28461    }
28462}
28463impl MessageData for SERIAL_UDB_EXTRA_F16_DATA {
28464    type Message = MavMessage;
28465    const ID: u32 = 180u32;
28466    const NAME: &'static str = "SERIAL_UDB_EXTRA_F16";
28467    const EXTRA_CRC: u8 = 222u8;
28468    const ENCODED_LEN: usize = 110usize;
28469    fn deser(
28470        _version: MavlinkVersion,
28471        __input: &[u8],
28472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28473        let avail_len = __input.len();
28474        let mut payload_buf = [0; Self::ENCODED_LEN];
28475        let mut buf = if avail_len < Self::ENCODED_LEN {
28476            payload_buf[0..avail_len].copy_from_slice(__input);
28477            Bytes::new(&payload_buf)
28478        } else {
28479            Bytes::new(__input)
28480        };
28481        let mut __struct = Self::default();
28482        for v in &mut __struct.sue_ID_LEAD_PILOT {
28483            let val = buf.get_u8();
28484            *v = val;
28485        }
28486        for v in &mut __struct.sue_ID_DIY_DRONES_URL {
28487            let val = buf.get_u8();
28488            *v = val;
28489        }
28490        Ok(__struct)
28491    }
28492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28493        let mut __tmp = BytesMut::new(bytes);
28494        #[allow(clippy::absurd_extreme_comparisons)]
28495        #[allow(unused_comparisons)]
28496        if __tmp.remaining() < Self::ENCODED_LEN {
28497            panic!(
28498                "buffer is too small (need {} bytes, but got {})",
28499                Self::ENCODED_LEN,
28500                __tmp.remaining(),
28501            )
28502        }
28503        for val in &self.sue_ID_LEAD_PILOT {
28504            __tmp.put_u8(*val);
28505        }
28506        for val in &self.sue_ID_DIY_DRONES_URL {
28507            __tmp.put_u8(*val);
28508        }
28509        if matches!(version, MavlinkVersion::V2) {
28510            let len = __tmp.len();
28511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28512        } else {
28513            __tmp.len()
28514        }
28515    }
28516}
28517#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F17 format."]
28518#[doc = ""]
28519#[doc = "ID: 183"]
28520#[derive(Debug, Clone, PartialEq)]
28521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28523#[cfg_attr(feature = "ts", derive(TS))]
28524#[cfg_attr(feature = "ts", ts(export))]
28525pub struct SERIAL_UDB_EXTRA_F17_DATA {
28526    #[doc = "SUE Feed Forward Gain"]
28527    pub sue_feed_forward: f32,
28528    #[doc = "SUE Max Turn Rate when Navigating"]
28529    pub sue_turn_rate_nav: f32,
28530    #[doc = "SUE Max Turn Rate in Fly By Wire Mode"]
28531    pub sue_turn_rate_fbw: f32,
28532}
28533impl SERIAL_UDB_EXTRA_F17_DATA {
28534    pub const ENCODED_LEN: usize = 12usize;
28535    pub const DEFAULT: Self = Self {
28536        sue_feed_forward: 0.0_f32,
28537        sue_turn_rate_nav: 0.0_f32,
28538        sue_turn_rate_fbw: 0.0_f32,
28539    };
28540    #[cfg(feature = "arbitrary")]
28541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28542        use arbitrary::{Arbitrary, Unstructured};
28543        let mut buf = [0u8; 1024];
28544        rng.fill_bytes(&mut buf);
28545        let mut unstructured = Unstructured::new(&buf);
28546        Self::arbitrary(&mut unstructured).unwrap_or_default()
28547    }
28548}
28549impl Default for SERIAL_UDB_EXTRA_F17_DATA {
28550    fn default() -> Self {
28551        Self::DEFAULT.clone()
28552    }
28553}
28554impl MessageData for SERIAL_UDB_EXTRA_F17_DATA {
28555    type Message = MavMessage;
28556    const ID: u32 = 183u32;
28557    const NAME: &'static str = "SERIAL_UDB_EXTRA_F17";
28558    const EXTRA_CRC: u8 = 175u8;
28559    const ENCODED_LEN: usize = 12usize;
28560    fn deser(
28561        _version: MavlinkVersion,
28562        __input: &[u8],
28563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28564        let avail_len = __input.len();
28565        let mut payload_buf = [0; Self::ENCODED_LEN];
28566        let mut buf = if avail_len < Self::ENCODED_LEN {
28567            payload_buf[0..avail_len].copy_from_slice(__input);
28568            Bytes::new(&payload_buf)
28569        } else {
28570            Bytes::new(__input)
28571        };
28572        let mut __struct = Self::default();
28573        __struct.sue_feed_forward = buf.get_f32_le();
28574        __struct.sue_turn_rate_nav = buf.get_f32_le();
28575        __struct.sue_turn_rate_fbw = buf.get_f32_le();
28576        Ok(__struct)
28577    }
28578    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28579        let mut __tmp = BytesMut::new(bytes);
28580        #[allow(clippy::absurd_extreme_comparisons)]
28581        #[allow(unused_comparisons)]
28582        if __tmp.remaining() < Self::ENCODED_LEN {
28583            panic!(
28584                "buffer is too small (need {} bytes, but got {})",
28585                Self::ENCODED_LEN,
28586                __tmp.remaining(),
28587            )
28588        }
28589        __tmp.put_f32_le(self.sue_feed_forward);
28590        __tmp.put_f32_le(self.sue_turn_rate_nav);
28591        __tmp.put_f32_le(self.sue_turn_rate_fbw);
28592        if matches!(version, MavlinkVersion::V2) {
28593            let len = __tmp.len();
28594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28595        } else {
28596            __tmp.len()
28597        }
28598    }
28599}
28600#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F18 format."]
28601#[doc = ""]
28602#[doc = "ID: 184"]
28603#[derive(Debug, Clone, PartialEq)]
28604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28606#[cfg_attr(feature = "ts", derive(TS))]
28607#[cfg_attr(feature = "ts", ts(export))]
28608pub struct SERIAL_UDB_EXTRA_F18_DATA {
28609    #[doc = "SUE Angle of Attack Normal"]
28610    pub angle_of_attack_normal: f32,
28611    #[doc = "SUE Angle of Attack Inverted"]
28612    pub angle_of_attack_inverted: f32,
28613    #[doc = "SUE Elevator Trim Normal"]
28614    pub elevator_trim_normal: f32,
28615    #[doc = "SUE Elevator Trim Inverted"]
28616    pub elevator_trim_inverted: f32,
28617    #[doc = "SUE reference_speed"]
28618    pub reference_speed: f32,
28619}
28620impl SERIAL_UDB_EXTRA_F18_DATA {
28621    pub const ENCODED_LEN: usize = 20usize;
28622    pub const DEFAULT: Self = Self {
28623        angle_of_attack_normal: 0.0_f32,
28624        angle_of_attack_inverted: 0.0_f32,
28625        elevator_trim_normal: 0.0_f32,
28626        elevator_trim_inverted: 0.0_f32,
28627        reference_speed: 0.0_f32,
28628    };
28629    #[cfg(feature = "arbitrary")]
28630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28631        use arbitrary::{Arbitrary, Unstructured};
28632        let mut buf = [0u8; 1024];
28633        rng.fill_bytes(&mut buf);
28634        let mut unstructured = Unstructured::new(&buf);
28635        Self::arbitrary(&mut unstructured).unwrap_or_default()
28636    }
28637}
28638impl Default for SERIAL_UDB_EXTRA_F18_DATA {
28639    fn default() -> Self {
28640        Self::DEFAULT.clone()
28641    }
28642}
28643impl MessageData for SERIAL_UDB_EXTRA_F18_DATA {
28644    type Message = MavMessage;
28645    const ID: u32 = 184u32;
28646    const NAME: &'static str = "SERIAL_UDB_EXTRA_F18";
28647    const EXTRA_CRC: u8 = 41u8;
28648    const ENCODED_LEN: usize = 20usize;
28649    fn deser(
28650        _version: MavlinkVersion,
28651        __input: &[u8],
28652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28653        let avail_len = __input.len();
28654        let mut payload_buf = [0; Self::ENCODED_LEN];
28655        let mut buf = if avail_len < Self::ENCODED_LEN {
28656            payload_buf[0..avail_len].copy_from_slice(__input);
28657            Bytes::new(&payload_buf)
28658        } else {
28659            Bytes::new(__input)
28660        };
28661        let mut __struct = Self::default();
28662        __struct.angle_of_attack_normal = buf.get_f32_le();
28663        __struct.angle_of_attack_inverted = buf.get_f32_le();
28664        __struct.elevator_trim_normal = buf.get_f32_le();
28665        __struct.elevator_trim_inverted = buf.get_f32_le();
28666        __struct.reference_speed = buf.get_f32_le();
28667        Ok(__struct)
28668    }
28669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28670        let mut __tmp = BytesMut::new(bytes);
28671        #[allow(clippy::absurd_extreme_comparisons)]
28672        #[allow(unused_comparisons)]
28673        if __tmp.remaining() < Self::ENCODED_LEN {
28674            panic!(
28675                "buffer is too small (need {} bytes, but got {})",
28676                Self::ENCODED_LEN,
28677                __tmp.remaining(),
28678            )
28679        }
28680        __tmp.put_f32_le(self.angle_of_attack_normal);
28681        __tmp.put_f32_le(self.angle_of_attack_inverted);
28682        __tmp.put_f32_le(self.elevator_trim_normal);
28683        __tmp.put_f32_le(self.elevator_trim_inverted);
28684        __tmp.put_f32_le(self.reference_speed);
28685        if matches!(version, MavlinkVersion::V2) {
28686            let len = __tmp.len();
28687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28688        } else {
28689            __tmp.len()
28690        }
28691    }
28692}
28693#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F19 format."]
28694#[doc = ""]
28695#[doc = "ID: 185"]
28696#[derive(Debug, Clone, PartialEq)]
28697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28699#[cfg_attr(feature = "ts", derive(TS))]
28700#[cfg_attr(feature = "ts", ts(export))]
28701pub struct SERIAL_UDB_EXTRA_F19_DATA {
28702    #[doc = "SUE aileron output channel"]
28703    pub sue_aileron_output_channel: u8,
28704    #[doc = "SUE aileron reversed"]
28705    pub sue_aileron_reversed: u8,
28706    #[doc = "SUE elevator output channel"]
28707    pub sue_elevator_output_channel: u8,
28708    #[doc = "SUE elevator reversed"]
28709    pub sue_elevator_reversed: u8,
28710    #[doc = "SUE throttle output channel"]
28711    pub sue_throttle_output_channel: u8,
28712    #[doc = "SUE throttle reversed"]
28713    pub sue_throttle_reversed: u8,
28714    #[doc = "SUE rudder output channel"]
28715    pub sue_rudder_output_channel: u8,
28716    #[doc = "SUE rudder reversed"]
28717    pub sue_rudder_reversed: u8,
28718}
28719impl SERIAL_UDB_EXTRA_F19_DATA {
28720    pub const ENCODED_LEN: usize = 8usize;
28721    pub const DEFAULT: Self = Self {
28722        sue_aileron_output_channel: 0_u8,
28723        sue_aileron_reversed: 0_u8,
28724        sue_elevator_output_channel: 0_u8,
28725        sue_elevator_reversed: 0_u8,
28726        sue_throttle_output_channel: 0_u8,
28727        sue_throttle_reversed: 0_u8,
28728        sue_rudder_output_channel: 0_u8,
28729        sue_rudder_reversed: 0_u8,
28730    };
28731    #[cfg(feature = "arbitrary")]
28732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28733        use arbitrary::{Arbitrary, Unstructured};
28734        let mut buf = [0u8; 1024];
28735        rng.fill_bytes(&mut buf);
28736        let mut unstructured = Unstructured::new(&buf);
28737        Self::arbitrary(&mut unstructured).unwrap_or_default()
28738    }
28739}
28740impl Default for SERIAL_UDB_EXTRA_F19_DATA {
28741    fn default() -> Self {
28742        Self::DEFAULT.clone()
28743    }
28744}
28745impl MessageData for SERIAL_UDB_EXTRA_F19_DATA {
28746    type Message = MavMessage;
28747    const ID: u32 = 185u32;
28748    const NAME: &'static str = "SERIAL_UDB_EXTRA_F19";
28749    const EXTRA_CRC: u8 = 87u8;
28750    const ENCODED_LEN: usize = 8usize;
28751    fn deser(
28752        _version: MavlinkVersion,
28753        __input: &[u8],
28754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28755        let avail_len = __input.len();
28756        let mut payload_buf = [0; Self::ENCODED_LEN];
28757        let mut buf = if avail_len < Self::ENCODED_LEN {
28758            payload_buf[0..avail_len].copy_from_slice(__input);
28759            Bytes::new(&payload_buf)
28760        } else {
28761            Bytes::new(__input)
28762        };
28763        let mut __struct = Self::default();
28764        __struct.sue_aileron_output_channel = buf.get_u8();
28765        __struct.sue_aileron_reversed = buf.get_u8();
28766        __struct.sue_elevator_output_channel = buf.get_u8();
28767        __struct.sue_elevator_reversed = buf.get_u8();
28768        __struct.sue_throttle_output_channel = buf.get_u8();
28769        __struct.sue_throttle_reversed = buf.get_u8();
28770        __struct.sue_rudder_output_channel = buf.get_u8();
28771        __struct.sue_rudder_reversed = buf.get_u8();
28772        Ok(__struct)
28773    }
28774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28775        let mut __tmp = BytesMut::new(bytes);
28776        #[allow(clippy::absurd_extreme_comparisons)]
28777        #[allow(unused_comparisons)]
28778        if __tmp.remaining() < Self::ENCODED_LEN {
28779            panic!(
28780                "buffer is too small (need {} bytes, but got {})",
28781                Self::ENCODED_LEN,
28782                __tmp.remaining(),
28783            )
28784        }
28785        __tmp.put_u8(self.sue_aileron_output_channel);
28786        __tmp.put_u8(self.sue_aileron_reversed);
28787        __tmp.put_u8(self.sue_elevator_output_channel);
28788        __tmp.put_u8(self.sue_elevator_reversed);
28789        __tmp.put_u8(self.sue_throttle_output_channel);
28790        __tmp.put_u8(self.sue_throttle_reversed);
28791        __tmp.put_u8(self.sue_rudder_output_channel);
28792        __tmp.put_u8(self.sue_rudder_reversed);
28793        if matches!(version, MavlinkVersion::V2) {
28794            let len = __tmp.len();
28795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28796        } else {
28797            __tmp.len()
28798        }
28799    }
28800}
28801#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F20 format."]
28802#[doc = ""]
28803#[doc = "ID: 186"]
28804#[derive(Debug, Clone, PartialEq)]
28805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28807#[cfg_attr(feature = "ts", derive(TS))]
28808#[cfg_attr(feature = "ts", ts(export))]
28809pub struct SERIAL_UDB_EXTRA_F20_DATA {
28810    #[doc = "SUE UDB PWM Trim Value on Input 1"]
28811    pub sue_trim_value_input_1: i16,
28812    #[doc = "SUE UDB PWM Trim Value on Input 2"]
28813    pub sue_trim_value_input_2: i16,
28814    #[doc = "SUE UDB PWM Trim Value on Input 3"]
28815    pub sue_trim_value_input_3: i16,
28816    #[doc = "SUE UDB PWM Trim Value on Input 4"]
28817    pub sue_trim_value_input_4: i16,
28818    #[doc = "SUE UDB PWM Trim Value on Input 5"]
28819    pub sue_trim_value_input_5: i16,
28820    #[doc = "SUE UDB PWM Trim Value on Input 6"]
28821    pub sue_trim_value_input_6: i16,
28822    #[doc = "SUE UDB PWM Trim Value on Input 7"]
28823    pub sue_trim_value_input_7: i16,
28824    #[doc = "SUE UDB PWM Trim Value on Input 8"]
28825    pub sue_trim_value_input_8: i16,
28826    #[doc = "SUE UDB PWM Trim Value on Input 9"]
28827    pub sue_trim_value_input_9: i16,
28828    #[doc = "SUE UDB PWM Trim Value on Input 10"]
28829    pub sue_trim_value_input_10: i16,
28830    #[doc = "SUE UDB PWM Trim Value on Input 11"]
28831    pub sue_trim_value_input_11: i16,
28832    #[doc = "SUE UDB PWM Trim Value on Input 12"]
28833    pub sue_trim_value_input_12: i16,
28834    #[doc = "SUE Number of Input Channels"]
28835    pub sue_number_of_inputs: u8,
28836}
28837impl SERIAL_UDB_EXTRA_F20_DATA {
28838    pub const ENCODED_LEN: usize = 25usize;
28839    pub const DEFAULT: Self = Self {
28840        sue_trim_value_input_1: 0_i16,
28841        sue_trim_value_input_2: 0_i16,
28842        sue_trim_value_input_3: 0_i16,
28843        sue_trim_value_input_4: 0_i16,
28844        sue_trim_value_input_5: 0_i16,
28845        sue_trim_value_input_6: 0_i16,
28846        sue_trim_value_input_7: 0_i16,
28847        sue_trim_value_input_8: 0_i16,
28848        sue_trim_value_input_9: 0_i16,
28849        sue_trim_value_input_10: 0_i16,
28850        sue_trim_value_input_11: 0_i16,
28851        sue_trim_value_input_12: 0_i16,
28852        sue_number_of_inputs: 0_u8,
28853    };
28854    #[cfg(feature = "arbitrary")]
28855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28856        use arbitrary::{Arbitrary, Unstructured};
28857        let mut buf = [0u8; 1024];
28858        rng.fill_bytes(&mut buf);
28859        let mut unstructured = Unstructured::new(&buf);
28860        Self::arbitrary(&mut unstructured).unwrap_or_default()
28861    }
28862}
28863impl Default for SERIAL_UDB_EXTRA_F20_DATA {
28864    fn default() -> Self {
28865        Self::DEFAULT.clone()
28866    }
28867}
28868impl MessageData for SERIAL_UDB_EXTRA_F20_DATA {
28869    type Message = MavMessage;
28870    const ID: u32 = 186u32;
28871    const NAME: &'static str = "SERIAL_UDB_EXTRA_F20";
28872    const EXTRA_CRC: u8 = 144u8;
28873    const ENCODED_LEN: usize = 25usize;
28874    fn deser(
28875        _version: MavlinkVersion,
28876        __input: &[u8],
28877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28878        let avail_len = __input.len();
28879        let mut payload_buf = [0; Self::ENCODED_LEN];
28880        let mut buf = if avail_len < Self::ENCODED_LEN {
28881            payload_buf[0..avail_len].copy_from_slice(__input);
28882            Bytes::new(&payload_buf)
28883        } else {
28884            Bytes::new(__input)
28885        };
28886        let mut __struct = Self::default();
28887        __struct.sue_trim_value_input_1 = buf.get_i16_le();
28888        __struct.sue_trim_value_input_2 = buf.get_i16_le();
28889        __struct.sue_trim_value_input_3 = buf.get_i16_le();
28890        __struct.sue_trim_value_input_4 = buf.get_i16_le();
28891        __struct.sue_trim_value_input_5 = buf.get_i16_le();
28892        __struct.sue_trim_value_input_6 = buf.get_i16_le();
28893        __struct.sue_trim_value_input_7 = buf.get_i16_le();
28894        __struct.sue_trim_value_input_8 = buf.get_i16_le();
28895        __struct.sue_trim_value_input_9 = buf.get_i16_le();
28896        __struct.sue_trim_value_input_10 = buf.get_i16_le();
28897        __struct.sue_trim_value_input_11 = buf.get_i16_le();
28898        __struct.sue_trim_value_input_12 = buf.get_i16_le();
28899        __struct.sue_number_of_inputs = buf.get_u8();
28900        Ok(__struct)
28901    }
28902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28903        let mut __tmp = BytesMut::new(bytes);
28904        #[allow(clippy::absurd_extreme_comparisons)]
28905        #[allow(unused_comparisons)]
28906        if __tmp.remaining() < Self::ENCODED_LEN {
28907            panic!(
28908                "buffer is too small (need {} bytes, but got {})",
28909                Self::ENCODED_LEN,
28910                __tmp.remaining(),
28911            )
28912        }
28913        __tmp.put_i16_le(self.sue_trim_value_input_1);
28914        __tmp.put_i16_le(self.sue_trim_value_input_2);
28915        __tmp.put_i16_le(self.sue_trim_value_input_3);
28916        __tmp.put_i16_le(self.sue_trim_value_input_4);
28917        __tmp.put_i16_le(self.sue_trim_value_input_5);
28918        __tmp.put_i16_le(self.sue_trim_value_input_6);
28919        __tmp.put_i16_le(self.sue_trim_value_input_7);
28920        __tmp.put_i16_le(self.sue_trim_value_input_8);
28921        __tmp.put_i16_le(self.sue_trim_value_input_9);
28922        __tmp.put_i16_le(self.sue_trim_value_input_10);
28923        __tmp.put_i16_le(self.sue_trim_value_input_11);
28924        __tmp.put_i16_le(self.sue_trim_value_input_12);
28925        __tmp.put_u8(self.sue_number_of_inputs);
28926        if matches!(version, MavlinkVersion::V2) {
28927            let len = __tmp.len();
28928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28929        } else {
28930            __tmp.len()
28931        }
28932    }
28933}
28934#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F21 format."]
28935#[doc = ""]
28936#[doc = "ID: 187"]
28937#[derive(Debug, Clone, PartialEq)]
28938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28940#[cfg_attr(feature = "ts", derive(TS))]
28941#[cfg_attr(feature = "ts", ts(export))]
28942pub struct SERIAL_UDB_EXTRA_F21_DATA {
28943    #[doc = "SUE X accelerometer offset"]
28944    pub sue_accel_x_offset: i16,
28945    #[doc = "SUE Y accelerometer offset"]
28946    pub sue_accel_y_offset: i16,
28947    #[doc = "SUE Z accelerometer offset"]
28948    pub sue_accel_z_offset: i16,
28949    #[doc = "SUE X gyro offset"]
28950    pub sue_gyro_x_offset: i16,
28951    #[doc = "SUE Y gyro offset"]
28952    pub sue_gyro_y_offset: i16,
28953    #[doc = "SUE Z gyro offset"]
28954    pub sue_gyro_z_offset: i16,
28955}
28956impl SERIAL_UDB_EXTRA_F21_DATA {
28957    pub const ENCODED_LEN: usize = 12usize;
28958    pub const DEFAULT: Self = Self {
28959        sue_accel_x_offset: 0_i16,
28960        sue_accel_y_offset: 0_i16,
28961        sue_accel_z_offset: 0_i16,
28962        sue_gyro_x_offset: 0_i16,
28963        sue_gyro_y_offset: 0_i16,
28964        sue_gyro_z_offset: 0_i16,
28965    };
28966    #[cfg(feature = "arbitrary")]
28967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28968        use arbitrary::{Arbitrary, Unstructured};
28969        let mut buf = [0u8; 1024];
28970        rng.fill_bytes(&mut buf);
28971        let mut unstructured = Unstructured::new(&buf);
28972        Self::arbitrary(&mut unstructured).unwrap_or_default()
28973    }
28974}
28975impl Default for SERIAL_UDB_EXTRA_F21_DATA {
28976    fn default() -> Self {
28977        Self::DEFAULT.clone()
28978    }
28979}
28980impl MessageData for SERIAL_UDB_EXTRA_F21_DATA {
28981    type Message = MavMessage;
28982    const ID: u32 = 187u32;
28983    const NAME: &'static str = "SERIAL_UDB_EXTRA_F21";
28984    const EXTRA_CRC: u8 = 134u8;
28985    const ENCODED_LEN: usize = 12usize;
28986    fn deser(
28987        _version: MavlinkVersion,
28988        __input: &[u8],
28989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28990        let avail_len = __input.len();
28991        let mut payload_buf = [0; Self::ENCODED_LEN];
28992        let mut buf = if avail_len < Self::ENCODED_LEN {
28993            payload_buf[0..avail_len].copy_from_slice(__input);
28994            Bytes::new(&payload_buf)
28995        } else {
28996            Bytes::new(__input)
28997        };
28998        let mut __struct = Self::default();
28999        __struct.sue_accel_x_offset = buf.get_i16_le();
29000        __struct.sue_accel_y_offset = buf.get_i16_le();
29001        __struct.sue_accel_z_offset = buf.get_i16_le();
29002        __struct.sue_gyro_x_offset = buf.get_i16_le();
29003        __struct.sue_gyro_y_offset = buf.get_i16_le();
29004        __struct.sue_gyro_z_offset = buf.get_i16_le();
29005        Ok(__struct)
29006    }
29007    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29008        let mut __tmp = BytesMut::new(bytes);
29009        #[allow(clippy::absurd_extreme_comparisons)]
29010        #[allow(unused_comparisons)]
29011        if __tmp.remaining() < Self::ENCODED_LEN {
29012            panic!(
29013                "buffer is too small (need {} bytes, but got {})",
29014                Self::ENCODED_LEN,
29015                __tmp.remaining(),
29016            )
29017        }
29018        __tmp.put_i16_le(self.sue_accel_x_offset);
29019        __tmp.put_i16_le(self.sue_accel_y_offset);
29020        __tmp.put_i16_le(self.sue_accel_z_offset);
29021        __tmp.put_i16_le(self.sue_gyro_x_offset);
29022        __tmp.put_i16_le(self.sue_gyro_y_offset);
29023        __tmp.put_i16_le(self.sue_gyro_z_offset);
29024        if matches!(version, MavlinkVersion::V2) {
29025            let len = __tmp.len();
29026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29027        } else {
29028            __tmp.len()
29029        }
29030    }
29031}
29032#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F22 format."]
29033#[doc = ""]
29034#[doc = "ID: 188"]
29035#[derive(Debug, Clone, PartialEq)]
29036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29038#[cfg_attr(feature = "ts", derive(TS))]
29039#[cfg_attr(feature = "ts", ts(export))]
29040pub struct SERIAL_UDB_EXTRA_F22_DATA {
29041    #[doc = "SUE X accelerometer at calibration time"]
29042    pub sue_accel_x_at_calibration: i16,
29043    #[doc = "SUE Y accelerometer at calibration time"]
29044    pub sue_accel_y_at_calibration: i16,
29045    #[doc = "SUE Z accelerometer at calibration time"]
29046    pub sue_accel_z_at_calibration: i16,
29047    #[doc = "SUE X gyro at calibration time"]
29048    pub sue_gyro_x_at_calibration: i16,
29049    #[doc = "SUE Y gyro at calibration time"]
29050    pub sue_gyro_y_at_calibration: i16,
29051    #[doc = "SUE Z gyro at calibration time"]
29052    pub sue_gyro_z_at_calibration: i16,
29053}
29054impl SERIAL_UDB_EXTRA_F22_DATA {
29055    pub const ENCODED_LEN: usize = 12usize;
29056    pub const DEFAULT: Self = Self {
29057        sue_accel_x_at_calibration: 0_i16,
29058        sue_accel_y_at_calibration: 0_i16,
29059        sue_accel_z_at_calibration: 0_i16,
29060        sue_gyro_x_at_calibration: 0_i16,
29061        sue_gyro_y_at_calibration: 0_i16,
29062        sue_gyro_z_at_calibration: 0_i16,
29063    };
29064    #[cfg(feature = "arbitrary")]
29065    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29066        use arbitrary::{Arbitrary, Unstructured};
29067        let mut buf = [0u8; 1024];
29068        rng.fill_bytes(&mut buf);
29069        let mut unstructured = Unstructured::new(&buf);
29070        Self::arbitrary(&mut unstructured).unwrap_or_default()
29071    }
29072}
29073impl Default for SERIAL_UDB_EXTRA_F22_DATA {
29074    fn default() -> Self {
29075        Self::DEFAULT.clone()
29076    }
29077}
29078impl MessageData for SERIAL_UDB_EXTRA_F22_DATA {
29079    type Message = MavMessage;
29080    const ID: u32 = 188u32;
29081    const NAME: &'static str = "SERIAL_UDB_EXTRA_F22";
29082    const EXTRA_CRC: u8 = 91u8;
29083    const ENCODED_LEN: usize = 12usize;
29084    fn deser(
29085        _version: MavlinkVersion,
29086        __input: &[u8],
29087    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29088        let avail_len = __input.len();
29089        let mut payload_buf = [0; Self::ENCODED_LEN];
29090        let mut buf = if avail_len < Self::ENCODED_LEN {
29091            payload_buf[0..avail_len].copy_from_slice(__input);
29092            Bytes::new(&payload_buf)
29093        } else {
29094            Bytes::new(__input)
29095        };
29096        let mut __struct = Self::default();
29097        __struct.sue_accel_x_at_calibration = buf.get_i16_le();
29098        __struct.sue_accel_y_at_calibration = buf.get_i16_le();
29099        __struct.sue_accel_z_at_calibration = buf.get_i16_le();
29100        __struct.sue_gyro_x_at_calibration = buf.get_i16_le();
29101        __struct.sue_gyro_y_at_calibration = buf.get_i16_le();
29102        __struct.sue_gyro_z_at_calibration = buf.get_i16_le();
29103        Ok(__struct)
29104    }
29105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29106        let mut __tmp = BytesMut::new(bytes);
29107        #[allow(clippy::absurd_extreme_comparisons)]
29108        #[allow(unused_comparisons)]
29109        if __tmp.remaining() < Self::ENCODED_LEN {
29110            panic!(
29111                "buffer is too small (need {} bytes, but got {})",
29112                Self::ENCODED_LEN,
29113                __tmp.remaining(),
29114            )
29115        }
29116        __tmp.put_i16_le(self.sue_accel_x_at_calibration);
29117        __tmp.put_i16_le(self.sue_accel_y_at_calibration);
29118        __tmp.put_i16_le(self.sue_accel_z_at_calibration);
29119        __tmp.put_i16_le(self.sue_gyro_x_at_calibration);
29120        __tmp.put_i16_le(self.sue_gyro_y_at_calibration);
29121        __tmp.put_i16_le(self.sue_gyro_z_at_calibration);
29122        if matches!(version, MavlinkVersion::V2) {
29123            let len = __tmp.len();
29124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29125        } else {
29126            __tmp.len()
29127        }
29128    }
29129}
29130#[doc = "Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A."]
29131#[doc = ""]
29132#[doc = "ID: 170"]
29133#[derive(Debug, Clone, PartialEq)]
29134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29136#[cfg_attr(feature = "ts", derive(TS))]
29137#[cfg_attr(feature = "ts", ts(export))]
29138pub struct SERIAL_UDB_EXTRA_F2_A_DATA {
29139    #[doc = "Serial UDB Extra Time"]
29140    pub sue_time: u32,
29141    #[doc = "Serial UDB Extra Latitude"]
29142    pub sue_latitude: i32,
29143    #[doc = "Serial UDB Extra Longitude"]
29144    pub sue_longitude: i32,
29145    #[doc = "Serial UDB Extra Altitude"]
29146    pub sue_altitude: i32,
29147    #[doc = "Serial UDB Extra Waypoint Index"]
29148    pub sue_waypoint_index: u16,
29149    #[doc = "Serial UDB Extra Rmat 0"]
29150    pub sue_rmat0: i16,
29151    #[doc = "Serial UDB Extra Rmat 1"]
29152    pub sue_rmat1: i16,
29153    #[doc = "Serial UDB Extra Rmat 2"]
29154    pub sue_rmat2: i16,
29155    #[doc = "Serial UDB Extra Rmat 3"]
29156    pub sue_rmat3: i16,
29157    #[doc = "Serial UDB Extra Rmat 4"]
29158    pub sue_rmat4: i16,
29159    #[doc = "Serial UDB Extra Rmat 5"]
29160    pub sue_rmat5: i16,
29161    #[doc = "Serial UDB Extra Rmat 6"]
29162    pub sue_rmat6: i16,
29163    #[doc = "Serial UDB Extra Rmat 7"]
29164    pub sue_rmat7: i16,
29165    #[doc = "Serial UDB Extra Rmat 8"]
29166    pub sue_rmat8: i16,
29167    #[doc = "Serial UDB Extra GPS Course Over Ground"]
29168    pub sue_cog: u16,
29169    #[doc = "Serial UDB Extra Speed Over Ground"]
29170    pub sue_sog: i16,
29171    #[doc = "Serial UDB Extra CPU Load"]
29172    pub sue_cpu_load: u16,
29173    #[doc = "Serial UDB Extra 3D IMU Air Speed"]
29174    pub sue_air_speed_3DIMU: u16,
29175    #[doc = "Serial UDB Extra Estimated Wind 0"]
29176    pub sue_estimated_wind_0: i16,
29177    #[doc = "Serial UDB Extra Estimated Wind 1"]
29178    pub sue_estimated_wind_1: i16,
29179    #[doc = "Serial UDB Extra Estimated Wind 2"]
29180    pub sue_estimated_wind_2: i16,
29181    #[doc = "Serial UDB Extra Magnetic Field Earth 0"]
29182    pub sue_magFieldEarth0: i16,
29183    #[doc = "Serial UDB Extra Magnetic Field Earth 1"]
29184    pub sue_magFieldEarth1: i16,
29185    #[doc = "Serial UDB Extra Magnetic Field Earth 2"]
29186    pub sue_magFieldEarth2: i16,
29187    #[doc = "Serial UDB Extra Number of Satellites in View"]
29188    pub sue_svs: i16,
29189    #[doc = "Serial UDB Extra GPS Horizontal Dilution of Precision"]
29190    pub sue_hdop: i16,
29191    #[doc = "Serial UDB Extra Status"]
29192    pub sue_status: u8,
29193}
29194impl SERIAL_UDB_EXTRA_F2_A_DATA {
29195    pub const ENCODED_LEN: usize = 61usize;
29196    pub const DEFAULT: Self = Self {
29197        sue_time: 0_u32,
29198        sue_latitude: 0_i32,
29199        sue_longitude: 0_i32,
29200        sue_altitude: 0_i32,
29201        sue_waypoint_index: 0_u16,
29202        sue_rmat0: 0_i16,
29203        sue_rmat1: 0_i16,
29204        sue_rmat2: 0_i16,
29205        sue_rmat3: 0_i16,
29206        sue_rmat4: 0_i16,
29207        sue_rmat5: 0_i16,
29208        sue_rmat6: 0_i16,
29209        sue_rmat7: 0_i16,
29210        sue_rmat8: 0_i16,
29211        sue_cog: 0_u16,
29212        sue_sog: 0_i16,
29213        sue_cpu_load: 0_u16,
29214        sue_air_speed_3DIMU: 0_u16,
29215        sue_estimated_wind_0: 0_i16,
29216        sue_estimated_wind_1: 0_i16,
29217        sue_estimated_wind_2: 0_i16,
29218        sue_magFieldEarth0: 0_i16,
29219        sue_magFieldEarth1: 0_i16,
29220        sue_magFieldEarth2: 0_i16,
29221        sue_svs: 0_i16,
29222        sue_hdop: 0_i16,
29223        sue_status: 0_u8,
29224    };
29225    #[cfg(feature = "arbitrary")]
29226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29227        use arbitrary::{Arbitrary, Unstructured};
29228        let mut buf = [0u8; 1024];
29229        rng.fill_bytes(&mut buf);
29230        let mut unstructured = Unstructured::new(&buf);
29231        Self::arbitrary(&mut unstructured).unwrap_or_default()
29232    }
29233}
29234impl Default for SERIAL_UDB_EXTRA_F2_A_DATA {
29235    fn default() -> Self {
29236        Self::DEFAULT.clone()
29237    }
29238}
29239impl MessageData for SERIAL_UDB_EXTRA_F2_A_DATA {
29240    type Message = MavMessage;
29241    const ID: u32 = 170u32;
29242    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_A";
29243    const EXTRA_CRC: u8 = 103u8;
29244    const ENCODED_LEN: usize = 61usize;
29245    fn deser(
29246        _version: MavlinkVersion,
29247        __input: &[u8],
29248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29249        let avail_len = __input.len();
29250        let mut payload_buf = [0; Self::ENCODED_LEN];
29251        let mut buf = if avail_len < Self::ENCODED_LEN {
29252            payload_buf[0..avail_len].copy_from_slice(__input);
29253            Bytes::new(&payload_buf)
29254        } else {
29255            Bytes::new(__input)
29256        };
29257        let mut __struct = Self::default();
29258        __struct.sue_time = buf.get_u32_le();
29259        __struct.sue_latitude = buf.get_i32_le();
29260        __struct.sue_longitude = buf.get_i32_le();
29261        __struct.sue_altitude = buf.get_i32_le();
29262        __struct.sue_waypoint_index = buf.get_u16_le();
29263        __struct.sue_rmat0 = buf.get_i16_le();
29264        __struct.sue_rmat1 = buf.get_i16_le();
29265        __struct.sue_rmat2 = buf.get_i16_le();
29266        __struct.sue_rmat3 = buf.get_i16_le();
29267        __struct.sue_rmat4 = buf.get_i16_le();
29268        __struct.sue_rmat5 = buf.get_i16_le();
29269        __struct.sue_rmat6 = buf.get_i16_le();
29270        __struct.sue_rmat7 = buf.get_i16_le();
29271        __struct.sue_rmat8 = buf.get_i16_le();
29272        __struct.sue_cog = buf.get_u16_le();
29273        __struct.sue_sog = buf.get_i16_le();
29274        __struct.sue_cpu_load = buf.get_u16_le();
29275        __struct.sue_air_speed_3DIMU = buf.get_u16_le();
29276        __struct.sue_estimated_wind_0 = buf.get_i16_le();
29277        __struct.sue_estimated_wind_1 = buf.get_i16_le();
29278        __struct.sue_estimated_wind_2 = buf.get_i16_le();
29279        __struct.sue_magFieldEarth0 = buf.get_i16_le();
29280        __struct.sue_magFieldEarth1 = buf.get_i16_le();
29281        __struct.sue_magFieldEarth2 = buf.get_i16_le();
29282        __struct.sue_svs = buf.get_i16_le();
29283        __struct.sue_hdop = buf.get_i16_le();
29284        __struct.sue_status = buf.get_u8();
29285        Ok(__struct)
29286    }
29287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29288        let mut __tmp = BytesMut::new(bytes);
29289        #[allow(clippy::absurd_extreme_comparisons)]
29290        #[allow(unused_comparisons)]
29291        if __tmp.remaining() < Self::ENCODED_LEN {
29292            panic!(
29293                "buffer is too small (need {} bytes, but got {})",
29294                Self::ENCODED_LEN,
29295                __tmp.remaining(),
29296            )
29297        }
29298        __tmp.put_u32_le(self.sue_time);
29299        __tmp.put_i32_le(self.sue_latitude);
29300        __tmp.put_i32_le(self.sue_longitude);
29301        __tmp.put_i32_le(self.sue_altitude);
29302        __tmp.put_u16_le(self.sue_waypoint_index);
29303        __tmp.put_i16_le(self.sue_rmat0);
29304        __tmp.put_i16_le(self.sue_rmat1);
29305        __tmp.put_i16_le(self.sue_rmat2);
29306        __tmp.put_i16_le(self.sue_rmat3);
29307        __tmp.put_i16_le(self.sue_rmat4);
29308        __tmp.put_i16_le(self.sue_rmat5);
29309        __tmp.put_i16_le(self.sue_rmat6);
29310        __tmp.put_i16_le(self.sue_rmat7);
29311        __tmp.put_i16_le(self.sue_rmat8);
29312        __tmp.put_u16_le(self.sue_cog);
29313        __tmp.put_i16_le(self.sue_sog);
29314        __tmp.put_u16_le(self.sue_cpu_load);
29315        __tmp.put_u16_le(self.sue_air_speed_3DIMU);
29316        __tmp.put_i16_le(self.sue_estimated_wind_0);
29317        __tmp.put_i16_le(self.sue_estimated_wind_1);
29318        __tmp.put_i16_le(self.sue_estimated_wind_2);
29319        __tmp.put_i16_le(self.sue_magFieldEarth0);
29320        __tmp.put_i16_le(self.sue_magFieldEarth1);
29321        __tmp.put_i16_le(self.sue_magFieldEarth2);
29322        __tmp.put_i16_le(self.sue_svs);
29323        __tmp.put_i16_le(self.sue_hdop);
29324        __tmp.put_u8(self.sue_status);
29325        if matches!(version, MavlinkVersion::V2) {
29326            let len = __tmp.len();
29327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29328        } else {
29329            __tmp.len()
29330        }
29331    }
29332}
29333#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B."]
29334#[doc = ""]
29335#[doc = "ID: 171"]
29336#[derive(Debug, Clone, PartialEq)]
29337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29339#[cfg_attr(feature = "ts", derive(TS))]
29340#[cfg_attr(feature = "ts", ts(export))]
29341pub struct SERIAL_UDB_EXTRA_F2_B_DATA {
29342    #[doc = "Serial UDB Extra Time"]
29343    pub sue_time: u32,
29344    #[doc = "Serial UDB Extra Status Flags"]
29345    pub sue_flags: u32,
29346    #[doc = "SUE barometer pressure"]
29347    pub sue_barom_press: i32,
29348    #[doc = "SUE barometer altitude"]
29349    pub sue_barom_alt: i32,
29350    #[doc = "Serial UDB Extra PWM Input Channel 1"]
29351    pub sue_pwm_input_1: i16,
29352    #[doc = "Serial UDB Extra PWM Input Channel 2"]
29353    pub sue_pwm_input_2: i16,
29354    #[doc = "Serial UDB Extra PWM Input Channel 3"]
29355    pub sue_pwm_input_3: i16,
29356    #[doc = "Serial UDB Extra PWM Input Channel 4"]
29357    pub sue_pwm_input_4: i16,
29358    #[doc = "Serial UDB Extra PWM Input Channel 5"]
29359    pub sue_pwm_input_5: i16,
29360    #[doc = "Serial UDB Extra PWM Input Channel 6"]
29361    pub sue_pwm_input_6: i16,
29362    #[doc = "Serial UDB Extra PWM Input Channel 7"]
29363    pub sue_pwm_input_7: i16,
29364    #[doc = "Serial UDB Extra PWM Input Channel 8"]
29365    pub sue_pwm_input_8: i16,
29366    #[doc = "Serial UDB Extra PWM Input Channel 9"]
29367    pub sue_pwm_input_9: i16,
29368    #[doc = "Serial UDB Extra PWM Input Channel 10"]
29369    pub sue_pwm_input_10: i16,
29370    #[doc = "Serial UDB Extra PWM Input Channel 11"]
29371    pub sue_pwm_input_11: i16,
29372    #[doc = "Serial UDB Extra PWM Input Channel 12"]
29373    pub sue_pwm_input_12: i16,
29374    #[doc = "Serial UDB Extra PWM Output Channel 1"]
29375    pub sue_pwm_output_1: i16,
29376    #[doc = "Serial UDB Extra PWM Output Channel 2"]
29377    pub sue_pwm_output_2: i16,
29378    #[doc = "Serial UDB Extra PWM Output Channel 3"]
29379    pub sue_pwm_output_3: i16,
29380    #[doc = "Serial UDB Extra PWM Output Channel 4"]
29381    pub sue_pwm_output_4: i16,
29382    #[doc = "Serial UDB Extra PWM Output Channel 5"]
29383    pub sue_pwm_output_5: i16,
29384    #[doc = "Serial UDB Extra PWM Output Channel 6"]
29385    pub sue_pwm_output_6: i16,
29386    #[doc = "Serial UDB Extra PWM Output Channel 7"]
29387    pub sue_pwm_output_7: i16,
29388    #[doc = "Serial UDB Extra PWM Output Channel 8"]
29389    pub sue_pwm_output_8: i16,
29390    #[doc = "Serial UDB Extra PWM Output Channel 9"]
29391    pub sue_pwm_output_9: i16,
29392    #[doc = "Serial UDB Extra PWM Output Channel 10"]
29393    pub sue_pwm_output_10: i16,
29394    #[doc = "Serial UDB Extra PWM Output Channel 11"]
29395    pub sue_pwm_output_11: i16,
29396    #[doc = "Serial UDB Extra PWM Output Channel 12"]
29397    pub sue_pwm_output_12: i16,
29398    #[doc = "Serial UDB Extra IMU Location X"]
29399    pub sue_imu_location_x: i16,
29400    #[doc = "Serial UDB Extra IMU Location Y"]
29401    pub sue_imu_location_y: i16,
29402    #[doc = "Serial UDB Extra IMU Location Z"]
29403    pub sue_imu_location_z: i16,
29404    #[doc = "Serial UDB Location Error Earth X"]
29405    pub sue_location_error_earth_x: i16,
29406    #[doc = "Serial UDB Location Error Earth Y"]
29407    pub sue_location_error_earth_y: i16,
29408    #[doc = "Serial UDB Location Error Earth Z"]
29409    pub sue_location_error_earth_z: i16,
29410    #[doc = "Serial UDB Extra Oscillator Failure Count"]
29411    pub sue_osc_fails: i16,
29412    #[doc = "Serial UDB Extra IMU Velocity X"]
29413    pub sue_imu_velocity_x: i16,
29414    #[doc = "Serial UDB Extra IMU Velocity Y"]
29415    pub sue_imu_velocity_y: i16,
29416    #[doc = "Serial UDB Extra IMU Velocity Z"]
29417    pub sue_imu_velocity_z: i16,
29418    #[doc = "Serial UDB Extra Current Waypoint Goal X"]
29419    pub sue_waypoint_goal_x: i16,
29420    #[doc = "Serial UDB Extra Current Waypoint Goal Y"]
29421    pub sue_waypoint_goal_y: i16,
29422    #[doc = "Serial UDB Extra Current Waypoint Goal Z"]
29423    pub sue_waypoint_goal_z: i16,
29424    #[doc = "Aeroforce in UDB X Axis"]
29425    pub sue_aero_x: i16,
29426    #[doc = "Aeroforce in UDB Y Axis"]
29427    pub sue_aero_y: i16,
29428    #[doc = "Aeroforce in UDB Z axis"]
29429    pub sue_aero_z: i16,
29430    #[doc = "SUE barometer temperature"]
29431    pub sue_barom_temp: i16,
29432    #[doc = "SUE battery voltage"]
29433    pub sue_bat_volt: i16,
29434    #[doc = "SUE battery current"]
29435    pub sue_bat_amp: i16,
29436    #[doc = "SUE battery milli amp hours used"]
29437    pub sue_bat_amp_hours: i16,
29438    #[doc = "Sue autopilot desired height"]
29439    pub sue_desired_height: i16,
29440    #[doc = "Serial UDB Extra Stack Memory Free"]
29441    pub sue_memory_stack_free: i16,
29442}
29443impl SERIAL_UDB_EXTRA_F2_B_DATA {
29444    pub const ENCODED_LEN: usize = 108usize;
29445    pub const DEFAULT: Self = Self {
29446        sue_time: 0_u32,
29447        sue_flags: 0_u32,
29448        sue_barom_press: 0_i32,
29449        sue_barom_alt: 0_i32,
29450        sue_pwm_input_1: 0_i16,
29451        sue_pwm_input_2: 0_i16,
29452        sue_pwm_input_3: 0_i16,
29453        sue_pwm_input_4: 0_i16,
29454        sue_pwm_input_5: 0_i16,
29455        sue_pwm_input_6: 0_i16,
29456        sue_pwm_input_7: 0_i16,
29457        sue_pwm_input_8: 0_i16,
29458        sue_pwm_input_9: 0_i16,
29459        sue_pwm_input_10: 0_i16,
29460        sue_pwm_input_11: 0_i16,
29461        sue_pwm_input_12: 0_i16,
29462        sue_pwm_output_1: 0_i16,
29463        sue_pwm_output_2: 0_i16,
29464        sue_pwm_output_3: 0_i16,
29465        sue_pwm_output_4: 0_i16,
29466        sue_pwm_output_5: 0_i16,
29467        sue_pwm_output_6: 0_i16,
29468        sue_pwm_output_7: 0_i16,
29469        sue_pwm_output_8: 0_i16,
29470        sue_pwm_output_9: 0_i16,
29471        sue_pwm_output_10: 0_i16,
29472        sue_pwm_output_11: 0_i16,
29473        sue_pwm_output_12: 0_i16,
29474        sue_imu_location_x: 0_i16,
29475        sue_imu_location_y: 0_i16,
29476        sue_imu_location_z: 0_i16,
29477        sue_location_error_earth_x: 0_i16,
29478        sue_location_error_earth_y: 0_i16,
29479        sue_location_error_earth_z: 0_i16,
29480        sue_osc_fails: 0_i16,
29481        sue_imu_velocity_x: 0_i16,
29482        sue_imu_velocity_y: 0_i16,
29483        sue_imu_velocity_z: 0_i16,
29484        sue_waypoint_goal_x: 0_i16,
29485        sue_waypoint_goal_y: 0_i16,
29486        sue_waypoint_goal_z: 0_i16,
29487        sue_aero_x: 0_i16,
29488        sue_aero_y: 0_i16,
29489        sue_aero_z: 0_i16,
29490        sue_barom_temp: 0_i16,
29491        sue_bat_volt: 0_i16,
29492        sue_bat_amp: 0_i16,
29493        sue_bat_amp_hours: 0_i16,
29494        sue_desired_height: 0_i16,
29495        sue_memory_stack_free: 0_i16,
29496    };
29497    #[cfg(feature = "arbitrary")]
29498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29499        use arbitrary::{Arbitrary, Unstructured};
29500        let mut buf = [0u8; 1024];
29501        rng.fill_bytes(&mut buf);
29502        let mut unstructured = Unstructured::new(&buf);
29503        Self::arbitrary(&mut unstructured).unwrap_or_default()
29504    }
29505}
29506impl Default for SERIAL_UDB_EXTRA_F2_B_DATA {
29507    fn default() -> Self {
29508        Self::DEFAULT.clone()
29509    }
29510}
29511impl MessageData for SERIAL_UDB_EXTRA_F2_B_DATA {
29512    type Message = MavMessage;
29513    const ID: u32 = 171u32;
29514    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_B";
29515    const EXTRA_CRC: u8 = 245u8;
29516    const ENCODED_LEN: usize = 108usize;
29517    fn deser(
29518        _version: MavlinkVersion,
29519        __input: &[u8],
29520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29521        let avail_len = __input.len();
29522        let mut payload_buf = [0; Self::ENCODED_LEN];
29523        let mut buf = if avail_len < Self::ENCODED_LEN {
29524            payload_buf[0..avail_len].copy_from_slice(__input);
29525            Bytes::new(&payload_buf)
29526        } else {
29527            Bytes::new(__input)
29528        };
29529        let mut __struct = Self::default();
29530        __struct.sue_time = buf.get_u32_le();
29531        __struct.sue_flags = buf.get_u32_le();
29532        __struct.sue_barom_press = buf.get_i32_le();
29533        __struct.sue_barom_alt = buf.get_i32_le();
29534        __struct.sue_pwm_input_1 = buf.get_i16_le();
29535        __struct.sue_pwm_input_2 = buf.get_i16_le();
29536        __struct.sue_pwm_input_3 = buf.get_i16_le();
29537        __struct.sue_pwm_input_4 = buf.get_i16_le();
29538        __struct.sue_pwm_input_5 = buf.get_i16_le();
29539        __struct.sue_pwm_input_6 = buf.get_i16_le();
29540        __struct.sue_pwm_input_7 = buf.get_i16_le();
29541        __struct.sue_pwm_input_8 = buf.get_i16_le();
29542        __struct.sue_pwm_input_9 = buf.get_i16_le();
29543        __struct.sue_pwm_input_10 = buf.get_i16_le();
29544        __struct.sue_pwm_input_11 = buf.get_i16_le();
29545        __struct.sue_pwm_input_12 = buf.get_i16_le();
29546        __struct.sue_pwm_output_1 = buf.get_i16_le();
29547        __struct.sue_pwm_output_2 = buf.get_i16_le();
29548        __struct.sue_pwm_output_3 = buf.get_i16_le();
29549        __struct.sue_pwm_output_4 = buf.get_i16_le();
29550        __struct.sue_pwm_output_5 = buf.get_i16_le();
29551        __struct.sue_pwm_output_6 = buf.get_i16_le();
29552        __struct.sue_pwm_output_7 = buf.get_i16_le();
29553        __struct.sue_pwm_output_8 = buf.get_i16_le();
29554        __struct.sue_pwm_output_9 = buf.get_i16_le();
29555        __struct.sue_pwm_output_10 = buf.get_i16_le();
29556        __struct.sue_pwm_output_11 = buf.get_i16_le();
29557        __struct.sue_pwm_output_12 = buf.get_i16_le();
29558        __struct.sue_imu_location_x = buf.get_i16_le();
29559        __struct.sue_imu_location_y = buf.get_i16_le();
29560        __struct.sue_imu_location_z = buf.get_i16_le();
29561        __struct.sue_location_error_earth_x = buf.get_i16_le();
29562        __struct.sue_location_error_earth_y = buf.get_i16_le();
29563        __struct.sue_location_error_earth_z = buf.get_i16_le();
29564        __struct.sue_osc_fails = buf.get_i16_le();
29565        __struct.sue_imu_velocity_x = buf.get_i16_le();
29566        __struct.sue_imu_velocity_y = buf.get_i16_le();
29567        __struct.sue_imu_velocity_z = buf.get_i16_le();
29568        __struct.sue_waypoint_goal_x = buf.get_i16_le();
29569        __struct.sue_waypoint_goal_y = buf.get_i16_le();
29570        __struct.sue_waypoint_goal_z = buf.get_i16_le();
29571        __struct.sue_aero_x = buf.get_i16_le();
29572        __struct.sue_aero_y = buf.get_i16_le();
29573        __struct.sue_aero_z = buf.get_i16_le();
29574        __struct.sue_barom_temp = buf.get_i16_le();
29575        __struct.sue_bat_volt = buf.get_i16_le();
29576        __struct.sue_bat_amp = buf.get_i16_le();
29577        __struct.sue_bat_amp_hours = buf.get_i16_le();
29578        __struct.sue_desired_height = buf.get_i16_le();
29579        __struct.sue_memory_stack_free = buf.get_i16_le();
29580        Ok(__struct)
29581    }
29582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29583        let mut __tmp = BytesMut::new(bytes);
29584        #[allow(clippy::absurd_extreme_comparisons)]
29585        #[allow(unused_comparisons)]
29586        if __tmp.remaining() < Self::ENCODED_LEN {
29587            panic!(
29588                "buffer is too small (need {} bytes, but got {})",
29589                Self::ENCODED_LEN,
29590                __tmp.remaining(),
29591            )
29592        }
29593        __tmp.put_u32_le(self.sue_time);
29594        __tmp.put_u32_le(self.sue_flags);
29595        __tmp.put_i32_le(self.sue_barom_press);
29596        __tmp.put_i32_le(self.sue_barom_alt);
29597        __tmp.put_i16_le(self.sue_pwm_input_1);
29598        __tmp.put_i16_le(self.sue_pwm_input_2);
29599        __tmp.put_i16_le(self.sue_pwm_input_3);
29600        __tmp.put_i16_le(self.sue_pwm_input_4);
29601        __tmp.put_i16_le(self.sue_pwm_input_5);
29602        __tmp.put_i16_le(self.sue_pwm_input_6);
29603        __tmp.put_i16_le(self.sue_pwm_input_7);
29604        __tmp.put_i16_le(self.sue_pwm_input_8);
29605        __tmp.put_i16_le(self.sue_pwm_input_9);
29606        __tmp.put_i16_le(self.sue_pwm_input_10);
29607        __tmp.put_i16_le(self.sue_pwm_input_11);
29608        __tmp.put_i16_le(self.sue_pwm_input_12);
29609        __tmp.put_i16_le(self.sue_pwm_output_1);
29610        __tmp.put_i16_le(self.sue_pwm_output_2);
29611        __tmp.put_i16_le(self.sue_pwm_output_3);
29612        __tmp.put_i16_le(self.sue_pwm_output_4);
29613        __tmp.put_i16_le(self.sue_pwm_output_5);
29614        __tmp.put_i16_le(self.sue_pwm_output_6);
29615        __tmp.put_i16_le(self.sue_pwm_output_7);
29616        __tmp.put_i16_le(self.sue_pwm_output_8);
29617        __tmp.put_i16_le(self.sue_pwm_output_9);
29618        __tmp.put_i16_le(self.sue_pwm_output_10);
29619        __tmp.put_i16_le(self.sue_pwm_output_11);
29620        __tmp.put_i16_le(self.sue_pwm_output_12);
29621        __tmp.put_i16_le(self.sue_imu_location_x);
29622        __tmp.put_i16_le(self.sue_imu_location_y);
29623        __tmp.put_i16_le(self.sue_imu_location_z);
29624        __tmp.put_i16_le(self.sue_location_error_earth_x);
29625        __tmp.put_i16_le(self.sue_location_error_earth_y);
29626        __tmp.put_i16_le(self.sue_location_error_earth_z);
29627        __tmp.put_i16_le(self.sue_osc_fails);
29628        __tmp.put_i16_le(self.sue_imu_velocity_x);
29629        __tmp.put_i16_le(self.sue_imu_velocity_y);
29630        __tmp.put_i16_le(self.sue_imu_velocity_z);
29631        __tmp.put_i16_le(self.sue_waypoint_goal_x);
29632        __tmp.put_i16_le(self.sue_waypoint_goal_y);
29633        __tmp.put_i16_le(self.sue_waypoint_goal_z);
29634        __tmp.put_i16_le(self.sue_aero_x);
29635        __tmp.put_i16_le(self.sue_aero_y);
29636        __tmp.put_i16_le(self.sue_aero_z);
29637        __tmp.put_i16_le(self.sue_barom_temp);
29638        __tmp.put_i16_le(self.sue_bat_volt);
29639        __tmp.put_i16_le(self.sue_bat_amp);
29640        __tmp.put_i16_le(self.sue_bat_amp_hours);
29641        __tmp.put_i16_le(self.sue_desired_height);
29642        __tmp.put_i16_le(self.sue_memory_stack_free);
29643        if matches!(version, MavlinkVersion::V2) {
29644            let len = __tmp.len();
29645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29646        } else {
29647            __tmp.len()
29648        }
29649    }
29650}
29651#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F4: format."]
29652#[doc = ""]
29653#[doc = "ID: 172"]
29654#[derive(Debug, Clone, PartialEq)]
29655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29657#[cfg_attr(feature = "ts", derive(TS))]
29658#[cfg_attr(feature = "ts", ts(export))]
29659pub struct SERIAL_UDB_EXTRA_F4_DATA {
29660    #[doc = "Serial UDB Extra Roll Stabilization with Ailerons Enabled"]
29661    pub sue_ROLL_STABILIZATION_AILERONS: u8,
29662    #[doc = "Serial UDB Extra Roll Stabilization with Rudder Enabled"]
29663    pub sue_ROLL_STABILIZATION_RUDDER: u8,
29664    #[doc = "Serial UDB Extra Pitch Stabilization Enabled"]
29665    pub sue_PITCH_STABILIZATION: u8,
29666    #[doc = "Serial UDB Extra Yaw Stabilization using Rudder Enabled"]
29667    pub sue_YAW_STABILIZATION_RUDDER: u8,
29668    #[doc = "Serial UDB Extra Yaw Stabilization using Ailerons Enabled"]
29669    pub sue_YAW_STABILIZATION_AILERON: u8,
29670    #[doc = "Serial UDB Extra Navigation with Ailerons Enabled"]
29671    pub sue_AILERON_NAVIGATION: u8,
29672    #[doc = "Serial UDB Extra Navigation with Rudder Enabled"]
29673    pub sue_RUDDER_NAVIGATION: u8,
29674    #[doc = "Serial UDB Extra Type of Alitude Hold when in Stabilized Mode"]
29675    pub sue_ALTITUDEHOLD_STABILIZED: u8,
29676    #[doc = "Serial UDB Extra Type of Alitude Hold when in Waypoint Mode"]
29677    pub sue_ALTITUDEHOLD_WAYPOINT: u8,
29678    #[doc = "Serial UDB Extra Firmware racing mode enabled"]
29679    pub sue_RACING_MODE: u8,
29680}
29681impl SERIAL_UDB_EXTRA_F4_DATA {
29682    pub const ENCODED_LEN: usize = 10usize;
29683    pub const DEFAULT: Self = Self {
29684        sue_ROLL_STABILIZATION_AILERONS: 0_u8,
29685        sue_ROLL_STABILIZATION_RUDDER: 0_u8,
29686        sue_PITCH_STABILIZATION: 0_u8,
29687        sue_YAW_STABILIZATION_RUDDER: 0_u8,
29688        sue_YAW_STABILIZATION_AILERON: 0_u8,
29689        sue_AILERON_NAVIGATION: 0_u8,
29690        sue_RUDDER_NAVIGATION: 0_u8,
29691        sue_ALTITUDEHOLD_STABILIZED: 0_u8,
29692        sue_ALTITUDEHOLD_WAYPOINT: 0_u8,
29693        sue_RACING_MODE: 0_u8,
29694    };
29695    #[cfg(feature = "arbitrary")]
29696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29697        use arbitrary::{Arbitrary, Unstructured};
29698        let mut buf = [0u8; 1024];
29699        rng.fill_bytes(&mut buf);
29700        let mut unstructured = Unstructured::new(&buf);
29701        Self::arbitrary(&mut unstructured).unwrap_or_default()
29702    }
29703}
29704impl Default for SERIAL_UDB_EXTRA_F4_DATA {
29705    fn default() -> Self {
29706        Self::DEFAULT.clone()
29707    }
29708}
29709impl MessageData for SERIAL_UDB_EXTRA_F4_DATA {
29710    type Message = MavMessage;
29711    const ID: u32 = 172u32;
29712    const NAME: &'static str = "SERIAL_UDB_EXTRA_F4";
29713    const EXTRA_CRC: u8 = 191u8;
29714    const ENCODED_LEN: usize = 10usize;
29715    fn deser(
29716        _version: MavlinkVersion,
29717        __input: &[u8],
29718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29719        let avail_len = __input.len();
29720        let mut payload_buf = [0; Self::ENCODED_LEN];
29721        let mut buf = if avail_len < Self::ENCODED_LEN {
29722            payload_buf[0..avail_len].copy_from_slice(__input);
29723            Bytes::new(&payload_buf)
29724        } else {
29725            Bytes::new(__input)
29726        };
29727        let mut __struct = Self::default();
29728        __struct.sue_ROLL_STABILIZATION_AILERONS = buf.get_u8();
29729        __struct.sue_ROLL_STABILIZATION_RUDDER = buf.get_u8();
29730        __struct.sue_PITCH_STABILIZATION = buf.get_u8();
29731        __struct.sue_YAW_STABILIZATION_RUDDER = buf.get_u8();
29732        __struct.sue_YAW_STABILIZATION_AILERON = buf.get_u8();
29733        __struct.sue_AILERON_NAVIGATION = buf.get_u8();
29734        __struct.sue_RUDDER_NAVIGATION = buf.get_u8();
29735        __struct.sue_ALTITUDEHOLD_STABILIZED = buf.get_u8();
29736        __struct.sue_ALTITUDEHOLD_WAYPOINT = buf.get_u8();
29737        __struct.sue_RACING_MODE = buf.get_u8();
29738        Ok(__struct)
29739    }
29740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29741        let mut __tmp = BytesMut::new(bytes);
29742        #[allow(clippy::absurd_extreme_comparisons)]
29743        #[allow(unused_comparisons)]
29744        if __tmp.remaining() < Self::ENCODED_LEN {
29745            panic!(
29746                "buffer is too small (need {} bytes, but got {})",
29747                Self::ENCODED_LEN,
29748                __tmp.remaining(),
29749            )
29750        }
29751        __tmp.put_u8(self.sue_ROLL_STABILIZATION_AILERONS);
29752        __tmp.put_u8(self.sue_ROLL_STABILIZATION_RUDDER);
29753        __tmp.put_u8(self.sue_PITCH_STABILIZATION);
29754        __tmp.put_u8(self.sue_YAW_STABILIZATION_RUDDER);
29755        __tmp.put_u8(self.sue_YAW_STABILIZATION_AILERON);
29756        __tmp.put_u8(self.sue_AILERON_NAVIGATION);
29757        __tmp.put_u8(self.sue_RUDDER_NAVIGATION);
29758        __tmp.put_u8(self.sue_ALTITUDEHOLD_STABILIZED);
29759        __tmp.put_u8(self.sue_ALTITUDEHOLD_WAYPOINT);
29760        __tmp.put_u8(self.sue_RACING_MODE);
29761        if matches!(version, MavlinkVersion::V2) {
29762            let len = __tmp.len();
29763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29764        } else {
29765            __tmp.len()
29766        }
29767    }
29768}
29769#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F5: format."]
29770#[doc = ""]
29771#[doc = "ID: 173"]
29772#[derive(Debug, Clone, PartialEq)]
29773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29775#[cfg_attr(feature = "ts", derive(TS))]
29776#[cfg_attr(feature = "ts", ts(export))]
29777pub struct SERIAL_UDB_EXTRA_F5_DATA {
29778    #[doc = "Serial UDB YAWKP_AILERON Gain for Proporional control of navigation"]
29779    pub sue_YAWKP_AILERON: f32,
29780    #[doc = "Serial UDB YAWKD_AILERON Gain for Rate control of navigation"]
29781    pub sue_YAWKD_AILERON: f32,
29782    #[doc = "Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization"]
29783    pub sue_ROLLKP: f32,
29784    #[doc = "Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization"]
29785    pub sue_ROLLKD: f32,
29786}
29787impl SERIAL_UDB_EXTRA_F5_DATA {
29788    pub const ENCODED_LEN: usize = 16usize;
29789    pub const DEFAULT: Self = Self {
29790        sue_YAWKP_AILERON: 0.0_f32,
29791        sue_YAWKD_AILERON: 0.0_f32,
29792        sue_ROLLKP: 0.0_f32,
29793        sue_ROLLKD: 0.0_f32,
29794    };
29795    #[cfg(feature = "arbitrary")]
29796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29797        use arbitrary::{Arbitrary, Unstructured};
29798        let mut buf = [0u8; 1024];
29799        rng.fill_bytes(&mut buf);
29800        let mut unstructured = Unstructured::new(&buf);
29801        Self::arbitrary(&mut unstructured).unwrap_or_default()
29802    }
29803}
29804impl Default for SERIAL_UDB_EXTRA_F5_DATA {
29805    fn default() -> Self {
29806        Self::DEFAULT.clone()
29807    }
29808}
29809impl MessageData for SERIAL_UDB_EXTRA_F5_DATA {
29810    type Message = MavMessage;
29811    const ID: u32 = 173u32;
29812    const NAME: &'static str = "SERIAL_UDB_EXTRA_F5";
29813    const EXTRA_CRC: u8 = 54u8;
29814    const ENCODED_LEN: usize = 16usize;
29815    fn deser(
29816        _version: MavlinkVersion,
29817        __input: &[u8],
29818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29819        let avail_len = __input.len();
29820        let mut payload_buf = [0; Self::ENCODED_LEN];
29821        let mut buf = if avail_len < Self::ENCODED_LEN {
29822            payload_buf[0..avail_len].copy_from_slice(__input);
29823            Bytes::new(&payload_buf)
29824        } else {
29825            Bytes::new(__input)
29826        };
29827        let mut __struct = Self::default();
29828        __struct.sue_YAWKP_AILERON = buf.get_f32_le();
29829        __struct.sue_YAWKD_AILERON = buf.get_f32_le();
29830        __struct.sue_ROLLKP = buf.get_f32_le();
29831        __struct.sue_ROLLKD = buf.get_f32_le();
29832        Ok(__struct)
29833    }
29834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29835        let mut __tmp = BytesMut::new(bytes);
29836        #[allow(clippy::absurd_extreme_comparisons)]
29837        #[allow(unused_comparisons)]
29838        if __tmp.remaining() < Self::ENCODED_LEN {
29839            panic!(
29840                "buffer is too small (need {} bytes, but got {})",
29841                Self::ENCODED_LEN,
29842                __tmp.remaining(),
29843            )
29844        }
29845        __tmp.put_f32_le(self.sue_YAWKP_AILERON);
29846        __tmp.put_f32_le(self.sue_YAWKD_AILERON);
29847        __tmp.put_f32_le(self.sue_ROLLKP);
29848        __tmp.put_f32_le(self.sue_ROLLKD);
29849        if matches!(version, MavlinkVersion::V2) {
29850            let len = __tmp.len();
29851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29852        } else {
29853            __tmp.len()
29854        }
29855    }
29856}
29857#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F6: format."]
29858#[doc = ""]
29859#[doc = "ID: 174"]
29860#[derive(Debug, Clone, PartialEq)]
29861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29863#[cfg_attr(feature = "ts", derive(TS))]
29864#[cfg_attr(feature = "ts", ts(export))]
29865pub struct SERIAL_UDB_EXTRA_F6_DATA {
29866    #[doc = "Serial UDB Extra PITCHGAIN Proportional Control"]
29867    pub sue_PITCHGAIN: f32,
29868    #[doc = "Serial UDB Extra Pitch Rate Control"]
29869    pub sue_PITCHKD: f32,
29870    #[doc = "Serial UDB Extra Rudder to Elevator Mix"]
29871    pub sue_RUDDER_ELEV_MIX: f32,
29872    #[doc = "Serial UDB Extra Roll to Elevator Mix"]
29873    pub sue_ROLL_ELEV_MIX: f32,
29874    #[doc = "Gain For Boosting Manual Elevator control When Plane Stabilized"]
29875    pub sue_ELEVATOR_BOOST: f32,
29876}
29877impl SERIAL_UDB_EXTRA_F6_DATA {
29878    pub const ENCODED_LEN: usize = 20usize;
29879    pub const DEFAULT: Self = Self {
29880        sue_PITCHGAIN: 0.0_f32,
29881        sue_PITCHKD: 0.0_f32,
29882        sue_RUDDER_ELEV_MIX: 0.0_f32,
29883        sue_ROLL_ELEV_MIX: 0.0_f32,
29884        sue_ELEVATOR_BOOST: 0.0_f32,
29885    };
29886    #[cfg(feature = "arbitrary")]
29887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29888        use arbitrary::{Arbitrary, Unstructured};
29889        let mut buf = [0u8; 1024];
29890        rng.fill_bytes(&mut buf);
29891        let mut unstructured = Unstructured::new(&buf);
29892        Self::arbitrary(&mut unstructured).unwrap_or_default()
29893    }
29894}
29895impl Default for SERIAL_UDB_EXTRA_F6_DATA {
29896    fn default() -> Self {
29897        Self::DEFAULT.clone()
29898    }
29899}
29900impl MessageData for SERIAL_UDB_EXTRA_F6_DATA {
29901    type Message = MavMessage;
29902    const ID: u32 = 174u32;
29903    const NAME: &'static str = "SERIAL_UDB_EXTRA_F6";
29904    const EXTRA_CRC: u8 = 54u8;
29905    const ENCODED_LEN: usize = 20usize;
29906    fn deser(
29907        _version: MavlinkVersion,
29908        __input: &[u8],
29909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29910        let avail_len = __input.len();
29911        let mut payload_buf = [0; Self::ENCODED_LEN];
29912        let mut buf = if avail_len < Self::ENCODED_LEN {
29913            payload_buf[0..avail_len].copy_from_slice(__input);
29914            Bytes::new(&payload_buf)
29915        } else {
29916            Bytes::new(__input)
29917        };
29918        let mut __struct = Self::default();
29919        __struct.sue_PITCHGAIN = buf.get_f32_le();
29920        __struct.sue_PITCHKD = buf.get_f32_le();
29921        __struct.sue_RUDDER_ELEV_MIX = buf.get_f32_le();
29922        __struct.sue_ROLL_ELEV_MIX = buf.get_f32_le();
29923        __struct.sue_ELEVATOR_BOOST = buf.get_f32_le();
29924        Ok(__struct)
29925    }
29926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29927        let mut __tmp = BytesMut::new(bytes);
29928        #[allow(clippy::absurd_extreme_comparisons)]
29929        #[allow(unused_comparisons)]
29930        if __tmp.remaining() < Self::ENCODED_LEN {
29931            panic!(
29932                "buffer is too small (need {} bytes, but got {})",
29933                Self::ENCODED_LEN,
29934                __tmp.remaining(),
29935            )
29936        }
29937        __tmp.put_f32_le(self.sue_PITCHGAIN);
29938        __tmp.put_f32_le(self.sue_PITCHKD);
29939        __tmp.put_f32_le(self.sue_RUDDER_ELEV_MIX);
29940        __tmp.put_f32_le(self.sue_ROLL_ELEV_MIX);
29941        __tmp.put_f32_le(self.sue_ELEVATOR_BOOST);
29942        if matches!(version, MavlinkVersion::V2) {
29943            let len = __tmp.len();
29944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29945        } else {
29946            __tmp.len()
29947        }
29948    }
29949}
29950#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F7: format."]
29951#[doc = ""]
29952#[doc = "ID: 175"]
29953#[derive(Debug, Clone, PartialEq)]
29954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29956#[cfg_attr(feature = "ts", derive(TS))]
29957#[cfg_attr(feature = "ts", ts(export))]
29958pub struct SERIAL_UDB_EXTRA_F7_DATA {
29959    #[doc = "Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation"]
29960    pub sue_YAWKP_RUDDER: f32,
29961    #[doc = "Serial UDB YAWKD_RUDDER Gain for Rate control of navigation"]
29962    pub sue_YAWKD_RUDDER: f32,
29963    #[doc = "Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization"]
29964    pub sue_ROLLKP_RUDDER: f32,
29965    #[doc = "Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization"]
29966    pub sue_ROLLKD_RUDDER: f32,
29967    #[doc = "SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized"]
29968    pub sue_RUDDER_BOOST: f32,
29969    #[doc = "Serial UDB Extra Return To Landing - Angle to Pitch Plane Down"]
29970    pub sue_RTL_PITCH_DOWN: f32,
29971}
29972impl SERIAL_UDB_EXTRA_F7_DATA {
29973    pub const ENCODED_LEN: usize = 24usize;
29974    pub const DEFAULT: Self = Self {
29975        sue_YAWKP_RUDDER: 0.0_f32,
29976        sue_YAWKD_RUDDER: 0.0_f32,
29977        sue_ROLLKP_RUDDER: 0.0_f32,
29978        sue_ROLLKD_RUDDER: 0.0_f32,
29979        sue_RUDDER_BOOST: 0.0_f32,
29980        sue_RTL_PITCH_DOWN: 0.0_f32,
29981    };
29982    #[cfg(feature = "arbitrary")]
29983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29984        use arbitrary::{Arbitrary, Unstructured};
29985        let mut buf = [0u8; 1024];
29986        rng.fill_bytes(&mut buf);
29987        let mut unstructured = Unstructured::new(&buf);
29988        Self::arbitrary(&mut unstructured).unwrap_or_default()
29989    }
29990}
29991impl Default for SERIAL_UDB_EXTRA_F7_DATA {
29992    fn default() -> Self {
29993        Self::DEFAULT.clone()
29994    }
29995}
29996impl MessageData for SERIAL_UDB_EXTRA_F7_DATA {
29997    type Message = MavMessage;
29998    const ID: u32 = 175u32;
29999    const NAME: &'static str = "SERIAL_UDB_EXTRA_F7";
30000    const EXTRA_CRC: u8 = 171u8;
30001    const ENCODED_LEN: usize = 24usize;
30002    fn deser(
30003        _version: MavlinkVersion,
30004        __input: &[u8],
30005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30006        let avail_len = __input.len();
30007        let mut payload_buf = [0; Self::ENCODED_LEN];
30008        let mut buf = if avail_len < Self::ENCODED_LEN {
30009            payload_buf[0..avail_len].copy_from_slice(__input);
30010            Bytes::new(&payload_buf)
30011        } else {
30012            Bytes::new(__input)
30013        };
30014        let mut __struct = Self::default();
30015        __struct.sue_YAWKP_RUDDER = buf.get_f32_le();
30016        __struct.sue_YAWKD_RUDDER = buf.get_f32_le();
30017        __struct.sue_ROLLKP_RUDDER = buf.get_f32_le();
30018        __struct.sue_ROLLKD_RUDDER = buf.get_f32_le();
30019        __struct.sue_RUDDER_BOOST = buf.get_f32_le();
30020        __struct.sue_RTL_PITCH_DOWN = buf.get_f32_le();
30021        Ok(__struct)
30022    }
30023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30024        let mut __tmp = BytesMut::new(bytes);
30025        #[allow(clippy::absurd_extreme_comparisons)]
30026        #[allow(unused_comparisons)]
30027        if __tmp.remaining() < Self::ENCODED_LEN {
30028            panic!(
30029                "buffer is too small (need {} bytes, but got {})",
30030                Self::ENCODED_LEN,
30031                __tmp.remaining(),
30032            )
30033        }
30034        __tmp.put_f32_le(self.sue_YAWKP_RUDDER);
30035        __tmp.put_f32_le(self.sue_YAWKD_RUDDER);
30036        __tmp.put_f32_le(self.sue_ROLLKP_RUDDER);
30037        __tmp.put_f32_le(self.sue_ROLLKD_RUDDER);
30038        __tmp.put_f32_le(self.sue_RUDDER_BOOST);
30039        __tmp.put_f32_le(self.sue_RTL_PITCH_DOWN);
30040        if matches!(version, MavlinkVersion::V2) {
30041            let len = __tmp.len();
30042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30043        } else {
30044            __tmp.len()
30045        }
30046    }
30047}
30048#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F8: format."]
30049#[doc = ""]
30050#[doc = "ID: 176"]
30051#[derive(Debug, Clone, PartialEq)]
30052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30054#[cfg_attr(feature = "ts", derive(TS))]
30055#[cfg_attr(feature = "ts", ts(export))]
30056pub struct SERIAL_UDB_EXTRA_F8_DATA {
30057    #[doc = "Serial UDB Extra HEIGHT_TARGET_MAX"]
30058    pub sue_HEIGHT_TARGET_MAX: f32,
30059    #[doc = "Serial UDB Extra HEIGHT_TARGET_MIN"]
30060    pub sue_HEIGHT_TARGET_MIN: f32,
30061    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MIN"]
30062    pub sue_ALT_HOLD_THROTTLE_MIN: f32,
30063    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MAX"]
30064    pub sue_ALT_HOLD_THROTTLE_MAX: f32,
30065    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MIN"]
30066    pub sue_ALT_HOLD_PITCH_MIN: f32,
30067    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MAX"]
30068    pub sue_ALT_HOLD_PITCH_MAX: f32,
30069    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_HIGH"]
30070    pub sue_ALT_HOLD_PITCH_HIGH: f32,
30071}
30072impl SERIAL_UDB_EXTRA_F8_DATA {
30073    pub const ENCODED_LEN: usize = 28usize;
30074    pub const DEFAULT: Self = Self {
30075        sue_HEIGHT_TARGET_MAX: 0.0_f32,
30076        sue_HEIGHT_TARGET_MIN: 0.0_f32,
30077        sue_ALT_HOLD_THROTTLE_MIN: 0.0_f32,
30078        sue_ALT_HOLD_THROTTLE_MAX: 0.0_f32,
30079        sue_ALT_HOLD_PITCH_MIN: 0.0_f32,
30080        sue_ALT_HOLD_PITCH_MAX: 0.0_f32,
30081        sue_ALT_HOLD_PITCH_HIGH: 0.0_f32,
30082    };
30083    #[cfg(feature = "arbitrary")]
30084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30085        use arbitrary::{Arbitrary, Unstructured};
30086        let mut buf = [0u8; 1024];
30087        rng.fill_bytes(&mut buf);
30088        let mut unstructured = Unstructured::new(&buf);
30089        Self::arbitrary(&mut unstructured).unwrap_or_default()
30090    }
30091}
30092impl Default for SERIAL_UDB_EXTRA_F8_DATA {
30093    fn default() -> Self {
30094        Self::DEFAULT.clone()
30095    }
30096}
30097impl MessageData for SERIAL_UDB_EXTRA_F8_DATA {
30098    type Message = MavMessage;
30099    const ID: u32 = 176u32;
30100    const NAME: &'static str = "SERIAL_UDB_EXTRA_F8";
30101    const EXTRA_CRC: u8 = 142u8;
30102    const ENCODED_LEN: usize = 28usize;
30103    fn deser(
30104        _version: MavlinkVersion,
30105        __input: &[u8],
30106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30107        let avail_len = __input.len();
30108        let mut payload_buf = [0; Self::ENCODED_LEN];
30109        let mut buf = if avail_len < Self::ENCODED_LEN {
30110            payload_buf[0..avail_len].copy_from_slice(__input);
30111            Bytes::new(&payload_buf)
30112        } else {
30113            Bytes::new(__input)
30114        };
30115        let mut __struct = Self::default();
30116        __struct.sue_HEIGHT_TARGET_MAX = buf.get_f32_le();
30117        __struct.sue_HEIGHT_TARGET_MIN = buf.get_f32_le();
30118        __struct.sue_ALT_HOLD_THROTTLE_MIN = buf.get_f32_le();
30119        __struct.sue_ALT_HOLD_THROTTLE_MAX = buf.get_f32_le();
30120        __struct.sue_ALT_HOLD_PITCH_MIN = buf.get_f32_le();
30121        __struct.sue_ALT_HOLD_PITCH_MAX = buf.get_f32_le();
30122        __struct.sue_ALT_HOLD_PITCH_HIGH = buf.get_f32_le();
30123        Ok(__struct)
30124    }
30125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30126        let mut __tmp = BytesMut::new(bytes);
30127        #[allow(clippy::absurd_extreme_comparisons)]
30128        #[allow(unused_comparisons)]
30129        if __tmp.remaining() < Self::ENCODED_LEN {
30130            panic!(
30131                "buffer is too small (need {} bytes, but got {})",
30132                Self::ENCODED_LEN,
30133                __tmp.remaining(),
30134            )
30135        }
30136        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MAX);
30137        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MIN);
30138        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MIN);
30139        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MAX);
30140        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MIN);
30141        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MAX);
30142        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_HIGH);
30143        if matches!(version, MavlinkVersion::V2) {
30144            let len = __tmp.len();
30145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30146        } else {
30147            __tmp.len()
30148        }
30149    }
30150}
30151#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
30152#[doc = ""]
30153#[doc = "ID: 36"]
30154#[derive(Debug, Clone, PartialEq)]
30155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30157#[cfg_attr(feature = "ts", derive(TS))]
30158#[cfg_attr(feature = "ts", ts(export))]
30159pub struct SERVO_OUTPUT_RAW_DATA {
30160    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30161    pub time_usec: u32,
30162    #[doc = "Servo output 1 value"]
30163    pub servo1_raw: u16,
30164    #[doc = "Servo output 2 value"]
30165    pub servo2_raw: u16,
30166    #[doc = "Servo output 3 value"]
30167    pub servo3_raw: u16,
30168    #[doc = "Servo output 4 value"]
30169    pub servo4_raw: u16,
30170    #[doc = "Servo output 5 value"]
30171    pub servo5_raw: u16,
30172    #[doc = "Servo output 6 value"]
30173    pub servo6_raw: u16,
30174    #[doc = "Servo output 7 value"]
30175    pub servo7_raw: u16,
30176    #[doc = "Servo output 8 value"]
30177    pub servo8_raw: u16,
30178    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
30179    pub port: u8,
30180    #[doc = "Servo output 9 value"]
30181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30182    pub servo9_raw: u16,
30183    #[doc = "Servo output 10 value"]
30184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30185    pub servo10_raw: u16,
30186    #[doc = "Servo output 11 value"]
30187    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30188    pub servo11_raw: u16,
30189    #[doc = "Servo output 12 value"]
30190    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30191    pub servo12_raw: u16,
30192    #[doc = "Servo output 13 value"]
30193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30194    pub servo13_raw: u16,
30195    #[doc = "Servo output 14 value"]
30196    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30197    pub servo14_raw: u16,
30198    #[doc = "Servo output 15 value"]
30199    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30200    pub servo15_raw: u16,
30201    #[doc = "Servo output 16 value"]
30202    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30203    pub servo16_raw: u16,
30204}
30205impl SERVO_OUTPUT_RAW_DATA {
30206    pub const ENCODED_LEN: usize = 37usize;
30207    pub const DEFAULT: Self = Self {
30208        time_usec: 0_u32,
30209        servo1_raw: 0_u16,
30210        servo2_raw: 0_u16,
30211        servo3_raw: 0_u16,
30212        servo4_raw: 0_u16,
30213        servo5_raw: 0_u16,
30214        servo6_raw: 0_u16,
30215        servo7_raw: 0_u16,
30216        servo8_raw: 0_u16,
30217        port: 0_u8,
30218        servo9_raw: 0_u16,
30219        servo10_raw: 0_u16,
30220        servo11_raw: 0_u16,
30221        servo12_raw: 0_u16,
30222        servo13_raw: 0_u16,
30223        servo14_raw: 0_u16,
30224        servo15_raw: 0_u16,
30225        servo16_raw: 0_u16,
30226    };
30227    #[cfg(feature = "arbitrary")]
30228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30229        use arbitrary::{Arbitrary, Unstructured};
30230        let mut buf = [0u8; 1024];
30231        rng.fill_bytes(&mut buf);
30232        let mut unstructured = Unstructured::new(&buf);
30233        Self::arbitrary(&mut unstructured).unwrap_or_default()
30234    }
30235}
30236impl Default for SERVO_OUTPUT_RAW_DATA {
30237    fn default() -> Self {
30238        Self::DEFAULT.clone()
30239    }
30240}
30241impl MessageData for SERVO_OUTPUT_RAW_DATA {
30242    type Message = MavMessage;
30243    const ID: u32 = 36u32;
30244    const NAME: &'static str = "SERVO_OUTPUT_RAW";
30245    const EXTRA_CRC: u8 = 222u8;
30246    const ENCODED_LEN: usize = 37usize;
30247    fn deser(
30248        _version: MavlinkVersion,
30249        __input: &[u8],
30250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30251        let avail_len = __input.len();
30252        let mut payload_buf = [0; Self::ENCODED_LEN];
30253        let mut buf = if avail_len < Self::ENCODED_LEN {
30254            payload_buf[0..avail_len].copy_from_slice(__input);
30255            Bytes::new(&payload_buf)
30256        } else {
30257            Bytes::new(__input)
30258        };
30259        let mut __struct = Self::default();
30260        __struct.time_usec = buf.get_u32_le();
30261        __struct.servo1_raw = buf.get_u16_le();
30262        __struct.servo2_raw = buf.get_u16_le();
30263        __struct.servo3_raw = buf.get_u16_le();
30264        __struct.servo4_raw = buf.get_u16_le();
30265        __struct.servo5_raw = buf.get_u16_le();
30266        __struct.servo6_raw = buf.get_u16_le();
30267        __struct.servo7_raw = buf.get_u16_le();
30268        __struct.servo8_raw = buf.get_u16_le();
30269        __struct.port = buf.get_u8();
30270        __struct.servo9_raw = buf.get_u16_le();
30271        __struct.servo10_raw = buf.get_u16_le();
30272        __struct.servo11_raw = buf.get_u16_le();
30273        __struct.servo12_raw = buf.get_u16_le();
30274        __struct.servo13_raw = buf.get_u16_le();
30275        __struct.servo14_raw = buf.get_u16_le();
30276        __struct.servo15_raw = buf.get_u16_le();
30277        __struct.servo16_raw = buf.get_u16_le();
30278        Ok(__struct)
30279    }
30280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30281        let mut __tmp = BytesMut::new(bytes);
30282        #[allow(clippy::absurd_extreme_comparisons)]
30283        #[allow(unused_comparisons)]
30284        if __tmp.remaining() < Self::ENCODED_LEN {
30285            panic!(
30286                "buffer is too small (need {} bytes, but got {})",
30287                Self::ENCODED_LEN,
30288                __tmp.remaining(),
30289            )
30290        }
30291        __tmp.put_u32_le(self.time_usec);
30292        __tmp.put_u16_le(self.servo1_raw);
30293        __tmp.put_u16_le(self.servo2_raw);
30294        __tmp.put_u16_le(self.servo3_raw);
30295        __tmp.put_u16_le(self.servo4_raw);
30296        __tmp.put_u16_le(self.servo5_raw);
30297        __tmp.put_u16_le(self.servo6_raw);
30298        __tmp.put_u16_le(self.servo7_raw);
30299        __tmp.put_u16_le(self.servo8_raw);
30300        __tmp.put_u8(self.port);
30301        if matches!(version, MavlinkVersion::V2) {
30302            __tmp.put_u16_le(self.servo9_raw);
30303            __tmp.put_u16_le(self.servo10_raw);
30304            __tmp.put_u16_le(self.servo11_raw);
30305            __tmp.put_u16_le(self.servo12_raw);
30306            __tmp.put_u16_le(self.servo13_raw);
30307            __tmp.put_u16_le(self.servo14_raw);
30308            __tmp.put_u16_le(self.servo15_raw);
30309            __tmp.put_u16_le(self.servo16_raw);
30310            let len = __tmp.len();
30311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30312        } else {
30313            __tmp.len()
30314        }
30315    }
30316}
30317#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
30318#[doc = ""]
30319#[doc = "ID: 256"]
30320#[derive(Debug, Clone, PartialEq)]
30321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30323#[cfg_attr(feature = "ts", derive(TS))]
30324#[cfg_attr(feature = "ts", ts(export))]
30325pub struct SETUP_SIGNING_DATA {
30326    #[doc = "initial timestamp"]
30327    pub initial_timestamp: u64,
30328    #[doc = "system id of the target"]
30329    pub target_system: u8,
30330    #[doc = "component ID of the target"]
30331    pub target_component: u8,
30332    #[doc = "signing key"]
30333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30334    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30335    pub secret_key: [u8; 32],
30336}
30337impl SETUP_SIGNING_DATA {
30338    pub const ENCODED_LEN: usize = 42usize;
30339    pub const DEFAULT: Self = Self {
30340        initial_timestamp: 0_u64,
30341        target_system: 0_u8,
30342        target_component: 0_u8,
30343        secret_key: [0_u8; 32usize],
30344    };
30345    #[cfg(feature = "arbitrary")]
30346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30347        use arbitrary::{Arbitrary, Unstructured};
30348        let mut buf = [0u8; 1024];
30349        rng.fill_bytes(&mut buf);
30350        let mut unstructured = Unstructured::new(&buf);
30351        Self::arbitrary(&mut unstructured).unwrap_or_default()
30352    }
30353}
30354impl Default for SETUP_SIGNING_DATA {
30355    fn default() -> Self {
30356        Self::DEFAULT.clone()
30357    }
30358}
30359impl MessageData for SETUP_SIGNING_DATA {
30360    type Message = MavMessage;
30361    const ID: u32 = 256u32;
30362    const NAME: &'static str = "SETUP_SIGNING";
30363    const EXTRA_CRC: u8 = 71u8;
30364    const ENCODED_LEN: usize = 42usize;
30365    fn deser(
30366        _version: MavlinkVersion,
30367        __input: &[u8],
30368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30369        let avail_len = __input.len();
30370        let mut payload_buf = [0; Self::ENCODED_LEN];
30371        let mut buf = if avail_len < Self::ENCODED_LEN {
30372            payload_buf[0..avail_len].copy_from_slice(__input);
30373            Bytes::new(&payload_buf)
30374        } else {
30375            Bytes::new(__input)
30376        };
30377        let mut __struct = Self::default();
30378        __struct.initial_timestamp = buf.get_u64_le();
30379        __struct.target_system = buf.get_u8();
30380        __struct.target_component = buf.get_u8();
30381        for v in &mut __struct.secret_key {
30382            let val = buf.get_u8();
30383            *v = val;
30384        }
30385        Ok(__struct)
30386    }
30387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30388        let mut __tmp = BytesMut::new(bytes);
30389        #[allow(clippy::absurd_extreme_comparisons)]
30390        #[allow(unused_comparisons)]
30391        if __tmp.remaining() < Self::ENCODED_LEN {
30392            panic!(
30393                "buffer is too small (need {} bytes, but got {})",
30394                Self::ENCODED_LEN,
30395                __tmp.remaining(),
30396            )
30397        }
30398        __tmp.put_u64_le(self.initial_timestamp);
30399        __tmp.put_u8(self.target_system);
30400        __tmp.put_u8(self.target_component);
30401        for val in &self.secret_key {
30402            __tmp.put_u8(*val);
30403        }
30404        if matches!(version, MavlinkVersion::V2) {
30405            let len = __tmp.len();
30406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30407        } else {
30408            __tmp.len()
30409        }
30410    }
30411}
30412#[doc = "Set the vehicle attitude and body angular rates."]
30413#[doc = ""]
30414#[doc = "ID: 139"]
30415#[derive(Debug, Clone, PartialEq)]
30416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30418#[cfg_attr(feature = "ts", derive(TS))]
30419#[cfg_attr(feature = "ts", ts(export))]
30420pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
30421    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30422    pub time_usec: u64,
30423    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
30424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30426    pub controls: [f32; 8],
30427    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
30428    pub group_mlx: u8,
30429    #[doc = "System ID"]
30430    pub target_system: u8,
30431    #[doc = "Component ID"]
30432    pub target_component: u8,
30433}
30434impl SET_ACTUATOR_CONTROL_TARGET_DATA {
30435    pub const ENCODED_LEN: usize = 43usize;
30436    pub const DEFAULT: Self = Self {
30437        time_usec: 0_u64,
30438        controls: [0.0_f32; 8usize],
30439        group_mlx: 0_u8,
30440        target_system: 0_u8,
30441        target_component: 0_u8,
30442    };
30443    #[cfg(feature = "arbitrary")]
30444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30445        use arbitrary::{Arbitrary, Unstructured};
30446        let mut buf = [0u8; 1024];
30447        rng.fill_bytes(&mut buf);
30448        let mut unstructured = Unstructured::new(&buf);
30449        Self::arbitrary(&mut unstructured).unwrap_or_default()
30450    }
30451}
30452impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
30453    fn default() -> Self {
30454        Self::DEFAULT.clone()
30455    }
30456}
30457impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
30458    type Message = MavMessage;
30459    const ID: u32 = 139u32;
30460    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
30461    const EXTRA_CRC: u8 = 168u8;
30462    const ENCODED_LEN: usize = 43usize;
30463    fn deser(
30464        _version: MavlinkVersion,
30465        __input: &[u8],
30466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30467        let avail_len = __input.len();
30468        let mut payload_buf = [0; Self::ENCODED_LEN];
30469        let mut buf = if avail_len < Self::ENCODED_LEN {
30470            payload_buf[0..avail_len].copy_from_slice(__input);
30471            Bytes::new(&payload_buf)
30472        } else {
30473            Bytes::new(__input)
30474        };
30475        let mut __struct = Self::default();
30476        __struct.time_usec = buf.get_u64_le();
30477        for v in &mut __struct.controls {
30478            let val = buf.get_f32_le();
30479            *v = val;
30480        }
30481        __struct.group_mlx = buf.get_u8();
30482        __struct.target_system = buf.get_u8();
30483        __struct.target_component = buf.get_u8();
30484        Ok(__struct)
30485    }
30486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30487        let mut __tmp = BytesMut::new(bytes);
30488        #[allow(clippy::absurd_extreme_comparisons)]
30489        #[allow(unused_comparisons)]
30490        if __tmp.remaining() < Self::ENCODED_LEN {
30491            panic!(
30492                "buffer is too small (need {} bytes, but got {})",
30493                Self::ENCODED_LEN,
30494                __tmp.remaining(),
30495            )
30496        }
30497        __tmp.put_u64_le(self.time_usec);
30498        for val in &self.controls {
30499            __tmp.put_f32_le(*val);
30500        }
30501        __tmp.put_u8(self.group_mlx);
30502        __tmp.put_u8(self.target_system);
30503        __tmp.put_u8(self.target_component);
30504        if matches!(version, MavlinkVersion::V2) {
30505            let len = __tmp.len();
30506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30507        } else {
30508            __tmp.len()
30509        }
30510    }
30511}
30512#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
30513#[doc = ""]
30514#[doc = "ID: 82"]
30515#[derive(Debug, Clone, PartialEq)]
30516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30518#[cfg_attr(feature = "ts", derive(TS))]
30519#[cfg_attr(feature = "ts", ts(export))]
30520pub struct SET_ATTITUDE_TARGET_DATA {
30521    #[doc = "Timestamp (time since system boot)."]
30522    pub time_boot_ms: u32,
30523    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
30524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30526    pub q: [f32; 4],
30527    #[doc = "Body roll rate"]
30528    pub body_roll_rate: f32,
30529    #[doc = "Body pitch rate"]
30530    pub body_pitch_rate: f32,
30531    #[doc = "Body yaw rate"]
30532    pub body_yaw_rate: f32,
30533    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
30534    pub thrust: f32,
30535    #[doc = "System ID"]
30536    pub target_system: u8,
30537    #[doc = "Component ID"]
30538    pub target_component: u8,
30539    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30540    pub type_mask: AttitudeTargetTypemask,
30541    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
30542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30543    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30544    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30545    pub thrust_body: [f32; 3],
30546}
30547impl SET_ATTITUDE_TARGET_DATA {
30548    pub const ENCODED_LEN: usize = 51usize;
30549    pub const DEFAULT: Self = Self {
30550        time_boot_ms: 0_u32,
30551        q: [0.0_f32; 4usize],
30552        body_roll_rate: 0.0_f32,
30553        body_pitch_rate: 0.0_f32,
30554        body_yaw_rate: 0.0_f32,
30555        thrust: 0.0_f32,
30556        target_system: 0_u8,
30557        target_component: 0_u8,
30558        type_mask: AttitudeTargetTypemask::DEFAULT,
30559        thrust_body: [0.0_f32; 3usize],
30560    };
30561    #[cfg(feature = "arbitrary")]
30562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30563        use arbitrary::{Arbitrary, Unstructured};
30564        let mut buf = [0u8; 1024];
30565        rng.fill_bytes(&mut buf);
30566        let mut unstructured = Unstructured::new(&buf);
30567        Self::arbitrary(&mut unstructured).unwrap_or_default()
30568    }
30569}
30570impl Default for SET_ATTITUDE_TARGET_DATA {
30571    fn default() -> Self {
30572        Self::DEFAULT.clone()
30573    }
30574}
30575impl MessageData for SET_ATTITUDE_TARGET_DATA {
30576    type Message = MavMessage;
30577    const ID: u32 = 82u32;
30578    const NAME: &'static str = "SET_ATTITUDE_TARGET";
30579    const EXTRA_CRC: u8 = 49u8;
30580    const ENCODED_LEN: usize = 51usize;
30581    fn deser(
30582        _version: MavlinkVersion,
30583        __input: &[u8],
30584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30585        let avail_len = __input.len();
30586        let mut payload_buf = [0; Self::ENCODED_LEN];
30587        let mut buf = if avail_len < Self::ENCODED_LEN {
30588            payload_buf[0..avail_len].copy_from_slice(__input);
30589            Bytes::new(&payload_buf)
30590        } else {
30591            Bytes::new(__input)
30592        };
30593        let mut __struct = Self::default();
30594        __struct.time_boot_ms = buf.get_u32_le();
30595        for v in &mut __struct.q {
30596            let val = buf.get_f32_le();
30597            *v = val;
30598        }
30599        __struct.body_roll_rate = buf.get_f32_le();
30600        __struct.body_pitch_rate = buf.get_f32_le();
30601        __struct.body_yaw_rate = buf.get_f32_le();
30602        __struct.thrust = buf.get_f32_le();
30603        __struct.target_system = buf.get_u8();
30604        __struct.target_component = buf.get_u8();
30605        let tmp = buf.get_u8();
30606        __struct.type_mask = AttitudeTargetTypemask::from_bits(
30607            tmp & AttitudeTargetTypemask::all().bits(),
30608        )
30609        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30610            flag_type: "AttitudeTargetTypemask",
30611            value: tmp as u32,
30612        })?;
30613        for v in &mut __struct.thrust_body {
30614            let val = buf.get_f32_le();
30615            *v = val;
30616        }
30617        Ok(__struct)
30618    }
30619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30620        let mut __tmp = BytesMut::new(bytes);
30621        #[allow(clippy::absurd_extreme_comparisons)]
30622        #[allow(unused_comparisons)]
30623        if __tmp.remaining() < Self::ENCODED_LEN {
30624            panic!(
30625                "buffer is too small (need {} bytes, but got {})",
30626                Self::ENCODED_LEN,
30627                __tmp.remaining(),
30628            )
30629        }
30630        __tmp.put_u32_le(self.time_boot_ms);
30631        for val in &self.q {
30632            __tmp.put_f32_le(*val);
30633        }
30634        __tmp.put_f32_le(self.body_roll_rate);
30635        __tmp.put_f32_le(self.body_pitch_rate);
30636        __tmp.put_f32_le(self.body_yaw_rate);
30637        __tmp.put_f32_le(self.thrust);
30638        __tmp.put_u8(self.target_system);
30639        __tmp.put_u8(self.target_component);
30640        __tmp.put_u8(self.type_mask.bits());
30641        if matches!(version, MavlinkVersion::V2) {
30642            for val in &self.thrust_body {
30643                __tmp.put_f32_le(*val);
30644            }
30645            let len = __tmp.len();
30646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30647        } else {
30648            __tmp.len()
30649        }
30650    }
30651}
30652#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
30653#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
30654#[doc = ""]
30655#[doc = "ID: 48"]
30656#[derive(Debug, Clone, PartialEq)]
30657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30659#[cfg_attr(feature = "ts", derive(TS))]
30660#[cfg_attr(feature = "ts", ts(export))]
30661pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
30662    #[doc = "Latitude (WGS84)"]
30663    pub latitude: i32,
30664    #[doc = "Longitude (WGS84)"]
30665    pub longitude: i32,
30666    #[doc = "Altitude (MSL). Positive for up."]
30667    pub altitude: i32,
30668    #[doc = "System ID"]
30669    pub target_system: u8,
30670    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30672    pub time_usec: u64,
30673}
30674impl SET_GPS_GLOBAL_ORIGIN_DATA {
30675    pub const ENCODED_LEN: usize = 21usize;
30676    pub const DEFAULT: Self = Self {
30677        latitude: 0_i32,
30678        longitude: 0_i32,
30679        altitude: 0_i32,
30680        target_system: 0_u8,
30681        time_usec: 0_u64,
30682    };
30683    #[cfg(feature = "arbitrary")]
30684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30685        use arbitrary::{Arbitrary, Unstructured};
30686        let mut buf = [0u8; 1024];
30687        rng.fill_bytes(&mut buf);
30688        let mut unstructured = Unstructured::new(&buf);
30689        Self::arbitrary(&mut unstructured).unwrap_or_default()
30690    }
30691}
30692impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
30693    fn default() -> Self {
30694        Self::DEFAULT.clone()
30695    }
30696}
30697impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
30698    type Message = MavMessage;
30699    const ID: u32 = 48u32;
30700    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
30701    const EXTRA_CRC: u8 = 41u8;
30702    const ENCODED_LEN: usize = 21usize;
30703    fn deser(
30704        _version: MavlinkVersion,
30705        __input: &[u8],
30706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30707        let avail_len = __input.len();
30708        let mut payload_buf = [0; Self::ENCODED_LEN];
30709        let mut buf = if avail_len < Self::ENCODED_LEN {
30710            payload_buf[0..avail_len].copy_from_slice(__input);
30711            Bytes::new(&payload_buf)
30712        } else {
30713            Bytes::new(__input)
30714        };
30715        let mut __struct = Self::default();
30716        __struct.latitude = buf.get_i32_le();
30717        __struct.longitude = buf.get_i32_le();
30718        __struct.altitude = buf.get_i32_le();
30719        __struct.target_system = buf.get_u8();
30720        __struct.time_usec = buf.get_u64_le();
30721        Ok(__struct)
30722    }
30723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30724        let mut __tmp = BytesMut::new(bytes);
30725        #[allow(clippy::absurd_extreme_comparisons)]
30726        #[allow(unused_comparisons)]
30727        if __tmp.remaining() < Self::ENCODED_LEN {
30728            panic!(
30729                "buffer is too small (need {} bytes, but got {})",
30730                Self::ENCODED_LEN,
30731                __tmp.remaining(),
30732            )
30733        }
30734        __tmp.put_i32_le(self.latitude);
30735        __tmp.put_i32_le(self.longitude);
30736        __tmp.put_i32_le(self.altitude);
30737        __tmp.put_u8(self.target_system);
30738        if matches!(version, MavlinkVersion::V2) {
30739            __tmp.put_u64_le(self.time_usec);
30740            let len = __tmp.len();
30741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30742        } else {
30743            __tmp.len()
30744        }
30745    }
30746}
30747#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
30748#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
30749#[doc = ""]
30750#[doc = "ID: 243"]
30751#[derive(Debug, Clone, PartialEq)]
30752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30754#[cfg_attr(feature = "ts", derive(TS))]
30755#[cfg_attr(feature = "ts", ts(export))]
30756pub struct SET_HOME_POSITION_DATA {
30757    #[doc = "Latitude (WGS84)"]
30758    pub latitude: i32,
30759    #[doc = "Longitude (WGS84)"]
30760    pub longitude: i32,
30761    #[doc = "Altitude (MSL). Positive for up."]
30762    pub altitude: i32,
30763    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
30764    pub x: f32,
30765    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
30766    pub y: f32,
30767    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
30768    pub z: f32,
30769    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
30770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30772    pub q: [f32; 4],
30773    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30774    pub approach_x: f32,
30775    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30776    pub approach_y: f32,
30777    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30778    pub approach_z: f32,
30779    #[doc = "System ID."]
30780    pub target_system: u8,
30781    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30782    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30783    pub time_usec: u64,
30784}
30785impl SET_HOME_POSITION_DATA {
30786    pub const ENCODED_LEN: usize = 61usize;
30787    pub const DEFAULT: Self = Self {
30788        latitude: 0_i32,
30789        longitude: 0_i32,
30790        altitude: 0_i32,
30791        x: 0.0_f32,
30792        y: 0.0_f32,
30793        z: 0.0_f32,
30794        q: [0.0_f32; 4usize],
30795        approach_x: 0.0_f32,
30796        approach_y: 0.0_f32,
30797        approach_z: 0.0_f32,
30798        target_system: 0_u8,
30799        time_usec: 0_u64,
30800    };
30801    #[cfg(feature = "arbitrary")]
30802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30803        use arbitrary::{Arbitrary, Unstructured};
30804        let mut buf = [0u8; 1024];
30805        rng.fill_bytes(&mut buf);
30806        let mut unstructured = Unstructured::new(&buf);
30807        Self::arbitrary(&mut unstructured).unwrap_or_default()
30808    }
30809}
30810impl Default for SET_HOME_POSITION_DATA {
30811    fn default() -> Self {
30812        Self::DEFAULT.clone()
30813    }
30814}
30815impl MessageData for SET_HOME_POSITION_DATA {
30816    type Message = MavMessage;
30817    const ID: u32 = 243u32;
30818    const NAME: &'static str = "SET_HOME_POSITION";
30819    const EXTRA_CRC: u8 = 85u8;
30820    const ENCODED_LEN: usize = 61usize;
30821    fn deser(
30822        _version: MavlinkVersion,
30823        __input: &[u8],
30824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30825        let avail_len = __input.len();
30826        let mut payload_buf = [0; Self::ENCODED_LEN];
30827        let mut buf = if avail_len < Self::ENCODED_LEN {
30828            payload_buf[0..avail_len].copy_from_slice(__input);
30829            Bytes::new(&payload_buf)
30830        } else {
30831            Bytes::new(__input)
30832        };
30833        let mut __struct = Self::default();
30834        __struct.latitude = buf.get_i32_le();
30835        __struct.longitude = buf.get_i32_le();
30836        __struct.altitude = buf.get_i32_le();
30837        __struct.x = buf.get_f32_le();
30838        __struct.y = buf.get_f32_le();
30839        __struct.z = buf.get_f32_le();
30840        for v in &mut __struct.q {
30841            let val = buf.get_f32_le();
30842            *v = val;
30843        }
30844        __struct.approach_x = buf.get_f32_le();
30845        __struct.approach_y = buf.get_f32_le();
30846        __struct.approach_z = buf.get_f32_le();
30847        __struct.target_system = buf.get_u8();
30848        __struct.time_usec = buf.get_u64_le();
30849        Ok(__struct)
30850    }
30851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30852        let mut __tmp = BytesMut::new(bytes);
30853        #[allow(clippy::absurd_extreme_comparisons)]
30854        #[allow(unused_comparisons)]
30855        if __tmp.remaining() < Self::ENCODED_LEN {
30856            panic!(
30857                "buffer is too small (need {} bytes, but got {})",
30858                Self::ENCODED_LEN,
30859                __tmp.remaining(),
30860            )
30861        }
30862        __tmp.put_i32_le(self.latitude);
30863        __tmp.put_i32_le(self.longitude);
30864        __tmp.put_i32_le(self.altitude);
30865        __tmp.put_f32_le(self.x);
30866        __tmp.put_f32_le(self.y);
30867        __tmp.put_f32_le(self.z);
30868        for val in &self.q {
30869            __tmp.put_f32_le(*val);
30870        }
30871        __tmp.put_f32_le(self.approach_x);
30872        __tmp.put_f32_le(self.approach_y);
30873        __tmp.put_f32_le(self.approach_z);
30874        __tmp.put_u8(self.target_system);
30875        if matches!(version, MavlinkVersion::V2) {
30876            __tmp.put_u64_le(self.time_usec);
30877            let len = __tmp.len();
30878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30879        } else {
30880            __tmp.len()
30881        }
30882    }
30883}
30884#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30885#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30886#[doc = ""]
30887#[doc = "ID: 11"]
30888#[derive(Debug, Clone, PartialEq)]
30889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30891#[cfg_attr(feature = "ts", derive(TS))]
30892#[cfg_attr(feature = "ts", ts(export))]
30893pub struct SET_MODE_DATA {
30894    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30895    pub custom_mode: u32,
30896    #[doc = "The system setting the mode"]
30897    pub target_system: u8,
30898    #[doc = "The new base mode."]
30899    pub base_mode: MavMode,
30900}
30901impl SET_MODE_DATA {
30902    pub const ENCODED_LEN: usize = 6usize;
30903    pub const DEFAULT: Self = Self {
30904        custom_mode: 0_u32,
30905        target_system: 0_u8,
30906        base_mode: MavMode::DEFAULT,
30907    };
30908    #[cfg(feature = "arbitrary")]
30909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30910        use arbitrary::{Arbitrary, Unstructured};
30911        let mut buf = [0u8; 1024];
30912        rng.fill_bytes(&mut buf);
30913        let mut unstructured = Unstructured::new(&buf);
30914        Self::arbitrary(&mut unstructured).unwrap_or_default()
30915    }
30916}
30917impl Default for SET_MODE_DATA {
30918    fn default() -> Self {
30919        Self::DEFAULT.clone()
30920    }
30921}
30922impl MessageData for SET_MODE_DATA {
30923    type Message = MavMessage;
30924    const ID: u32 = 11u32;
30925    const NAME: &'static str = "SET_MODE";
30926    const EXTRA_CRC: u8 = 89u8;
30927    const ENCODED_LEN: usize = 6usize;
30928    fn deser(
30929        _version: MavlinkVersion,
30930        __input: &[u8],
30931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30932        let avail_len = __input.len();
30933        let mut payload_buf = [0; Self::ENCODED_LEN];
30934        let mut buf = if avail_len < Self::ENCODED_LEN {
30935            payload_buf[0..avail_len].copy_from_slice(__input);
30936            Bytes::new(&payload_buf)
30937        } else {
30938            Bytes::new(__input)
30939        };
30940        let mut __struct = Self::default();
30941        __struct.custom_mode = buf.get_u32_le();
30942        __struct.target_system = buf.get_u8();
30943        let tmp = buf.get_u8();
30944        __struct.base_mode =
30945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30946                enum_type: "MavMode",
30947                value: tmp as u32,
30948            })?;
30949        Ok(__struct)
30950    }
30951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30952        let mut __tmp = BytesMut::new(bytes);
30953        #[allow(clippy::absurd_extreme_comparisons)]
30954        #[allow(unused_comparisons)]
30955        if __tmp.remaining() < Self::ENCODED_LEN {
30956            panic!(
30957                "buffer is too small (need {} bytes, but got {})",
30958                Self::ENCODED_LEN,
30959                __tmp.remaining(),
30960            )
30961        }
30962        __tmp.put_u32_le(self.custom_mode);
30963        __tmp.put_u8(self.target_system);
30964        __tmp.put_u8(self.base_mode as u8);
30965        if matches!(version, MavlinkVersion::V2) {
30966            let len = __tmp.len();
30967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30968        } else {
30969            __tmp.len()
30970        }
30971    }
30972}
30973#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30974#[doc = ""]
30975#[doc = "ID: 86"]
30976#[derive(Debug, Clone, PartialEq)]
30977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30979#[cfg_attr(feature = "ts", derive(TS))]
30980#[cfg_attr(feature = "ts", ts(export))]
30981pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30982    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30983    pub time_boot_ms: u32,
30984    #[doc = "Latitude in WGS84 frame"]
30985    pub lat_int: i32,
30986    #[doc = "Longitude in WGS84 frame"]
30987    pub lon_int: i32,
30988    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30989    pub alt: f32,
30990    #[doc = "X velocity in NED frame"]
30991    pub vx: f32,
30992    #[doc = "Y velocity in NED frame"]
30993    pub vy: f32,
30994    #[doc = "Z velocity in NED frame"]
30995    pub vz: f32,
30996    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30997    pub afx: f32,
30998    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30999    pub afy: f32,
31000    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31001    pub afz: f32,
31002    #[doc = "yaw setpoint"]
31003    pub yaw: f32,
31004    #[doc = "yaw rate setpoint"]
31005    pub yaw_rate: f32,
31006    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
31007    pub type_mask: PositionTargetTypemask,
31008    #[doc = "System ID"]
31009    pub target_system: u8,
31010    #[doc = "Component ID"]
31011    pub target_component: u8,
31012    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
31013    pub coordinate_frame: MavFrame,
31014}
31015impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
31016    pub const ENCODED_LEN: usize = 53usize;
31017    pub const DEFAULT: Self = Self {
31018        time_boot_ms: 0_u32,
31019        lat_int: 0_i32,
31020        lon_int: 0_i32,
31021        alt: 0.0_f32,
31022        vx: 0.0_f32,
31023        vy: 0.0_f32,
31024        vz: 0.0_f32,
31025        afx: 0.0_f32,
31026        afy: 0.0_f32,
31027        afz: 0.0_f32,
31028        yaw: 0.0_f32,
31029        yaw_rate: 0.0_f32,
31030        type_mask: PositionTargetTypemask::DEFAULT,
31031        target_system: 0_u8,
31032        target_component: 0_u8,
31033        coordinate_frame: MavFrame::DEFAULT,
31034    };
31035    #[cfg(feature = "arbitrary")]
31036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31037        use arbitrary::{Arbitrary, Unstructured};
31038        let mut buf = [0u8; 1024];
31039        rng.fill_bytes(&mut buf);
31040        let mut unstructured = Unstructured::new(&buf);
31041        Self::arbitrary(&mut unstructured).unwrap_or_default()
31042    }
31043}
31044impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
31045    fn default() -> Self {
31046        Self::DEFAULT.clone()
31047    }
31048}
31049impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
31050    type Message = MavMessage;
31051    const ID: u32 = 86u32;
31052    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
31053    const EXTRA_CRC: u8 = 5u8;
31054    const ENCODED_LEN: usize = 53usize;
31055    fn deser(
31056        _version: MavlinkVersion,
31057        __input: &[u8],
31058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31059        let avail_len = __input.len();
31060        let mut payload_buf = [0; Self::ENCODED_LEN];
31061        let mut buf = if avail_len < Self::ENCODED_LEN {
31062            payload_buf[0..avail_len].copy_from_slice(__input);
31063            Bytes::new(&payload_buf)
31064        } else {
31065            Bytes::new(__input)
31066        };
31067        let mut __struct = Self::default();
31068        __struct.time_boot_ms = buf.get_u32_le();
31069        __struct.lat_int = buf.get_i32_le();
31070        __struct.lon_int = buf.get_i32_le();
31071        __struct.alt = buf.get_f32_le();
31072        __struct.vx = buf.get_f32_le();
31073        __struct.vy = buf.get_f32_le();
31074        __struct.vz = buf.get_f32_le();
31075        __struct.afx = buf.get_f32_le();
31076        __struct.afy = buf.get_f32_le();
31077        __struct.afz = buf.get_f32_le();
31078        __struct.yaw = buf.get_f32_le();
31079        __struct.yaw_rate = buf.get_f32_le();
31080        let tmp = buf.get_u16_le();
31081        __struct.type_mask = PositionTargetTypemask::from_bits(
31082            tmp & PositionTargetTypemask::all().bits(),
31083        )
31084        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31085            flag_type: "PositionTargetTypemask",
31086            value: tmp as u32,
31087        })?;
31088        __struct.target_system = buf.get_u8();
31089        __struct.target_component = buf.get_u8();
31090        let tmp = buf.get_u8();
31091        __struct.coordinate_frame =
31092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31093                enum_type: "MavFrame",
31094                value: tmp as u32,
31095            })?;
31096        Ok(__struct)
31097    }
31098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31099        let mut __tmp = BytesMut::new(bytes);
31100        #[allow(clippy::absurd_extreme_comparisons)]
31101        #[allow(unused_comparisons)]
31102        if __tmp.remaining() < Self::ENCODED_LEN {
31103            panic!(
31104                "buffer is too small (need {} bytes, but got {})",
31105                Self::ENCODED_LEN,
31106                __tmp.remaining(),
31107            )
31108        }
31109        __tmp.put_u32_le(self.time_boot_ms);
31110        __tmp.put_i32_le(self.lat_int);
31111        __tmp.put_i32_le(self.lon_int);
31112        __tmp.put_f32_le(self.alt);
31113        __tmp.put_f32_le(self.vx);
31114        __tmp.put_f32_le(self.vy);
31115        __tmp.put_f32_le(self.vz);
31116        __tmp.put_f32_le(self.afx);
31117        __tmp.put_f32_le(self.afy);
31118        __tmp.put_f32_le(self.afz);
31119        __tmp.put_f32_le(self.yaw);
31120        __tmp.put_f32_le(self.yaw_rate);
31121        __tmp.put_u16_le(self.type_mask.bits());
31122        __tmp.put_u8(self.target_system);
31123        __tmp.put_u8(self.target_component);
31124        __tmp.put_u8(self.coordinate_frame as u8);
31125        if matches!(version, MavlinkVersion::V2) {
31126            let len = __tmp.len();
31127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31128        } else {
31129            __tmp.len()
31130        }
31131    }
31132}
31133#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
31134#[doc = ""]
31135#[doc = "ID: 84"]
31136#[derive(Debug, Clone, PartialEq)]
31137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31139#[cfg_attr(feature = "ts", derive(TS))]
31140#[cfg_attr(feature = "ts", ts(export))]
31141pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
31142    #[doc = "Timestamp (time since system boot)."]
31143    pub time_boot_ms: u32,
31144    #[doc = "X Position in NED frame"]
31145    pub x: f32,
31146    #[doc = "Y Position in NED frame"]
31147    pub y: f32,
31148    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
31149    pub z: f32,
31150    #[doc = "X velocity in NED frame"]
31151    pub vx: f32,
31152    #[doc = "Y velocity in NED frame"]
31153    pub vy: f32,
31154    #[doc = "Z velocity in NED frame"]
31155    pub vz: f32,
31156    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31157    pub afx: f32,
31158    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31159    pub afy: f32,
31160    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31161    pub afz: f32,
31162    #[doc = "yaw setpoint"]
31163    pub yaw: f32,
31164    #[doc = "yaw rate setpoint"]
31165    pub yaw_rate: f32,
31166    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
31167    pub type_mask: PositionTargetTypemask,
31168    #[doc = "System ID"]
31169    pub target_system: u8,
31170    #[doc = "Component ID"]
31171    pub target_component: u8,
31172    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
31173    pub coordinate_frame: MavFrame,
31174}
31175impl SET_POSITION_TARGET_LOCAL_NED_DATA {
31176    pub const ENCODED_LEN: usize = 53usize;
31177    pub const DEFAULT: Self = Self {
31178        time_boot_ms: 0_u32,
31179        x: 0.0_f32,
31180        y: 0.0_f32,
31181        z: 0.0_f32,
31182        vx: 0.0_f32,
31183        vy: 0.0_f32,
31184        vz: 0.0_f32,
31185        afx: 0.0_f32,
31186        afy: 0.0_f32,
31187        afz: 0.0_f32,
31188        yaw: 0.0_f32,
31189        yaw_rate: 0.0_f32,
31190        type_mask: PositionTargetTypemask::DEFAULT,
31191        target_system: 0_u8,
31192        target_component: 0_u8,
31193        coordinate_frame: MavFrame::DEFAULT,
31194    };
31195    #[cfg(feature = "arbitrary")]
31196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31197        use arbitrary::{Arbitrary, Unstructured};
31198        let mut buf = [0u8; 1024];
31199        rng.fill_bytes(&mut buf);
31200        let mut unstructured = Unstructured::new(&buf);
31201        Self::arbitrary(&mut unstructured).unwrap_or_default()
31202    }
31203}
31204impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
31205    fn default() -> Self {
31206        Self::DEFAULT.clone()
31207    }
31208}
31209impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
31210    type Message = MavMessage;
31211    const ID: u32 = 84u32;
31212    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
31213    const EXTRA_CRC: u8 = 143u8;
31214    const ENCODED_LEN: usize = 53usize;
31215    fn deser(
31216        _version: MavlinkVersion,
31217        __input: &[u8],
31218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31219        let avail_len = __input.len();
31220        let mut payload_buf = [0; Self::ENCODED_LEN];
31221        let mut buf = if avail_len < Self::ENCODED_LEN {
31222            payload_buf[0..avail_len].copy_from_slice(__input);
31223            Bytes::new(&payload_buf)
31224        } else {
31225            Bytes::new(__input)
31226        };
31227        let mut __struct = Self::default();
31228        __struct.time_boot_ms = buf.get_u32_le();
31229        __struct.x = buf.get_f32_le();
31230        __struct.y = buf.get_f32_le();
31231        __struct.z = buf.get_f32_le();
31232        __struct.vx = buf.get_f32_le();
31233        __struct.vy = buf.get_f32_le();
31234        __struct.vz = buf.get_f32_le();
31235        __struct.afx = buf.get_f32_le();
31236        __struct.afy = buf.get_f32_le();
31237        __struct.afz = buf.get_f32_le();
31238        __struct.yaw = buf.get_f32_le();
31239        __struct.yaw_rate = buf.get_f32_le();
31240        let tmp = buf.get_u16_le();
31241        __struct.type_mask = PositionTargetTypemask::from_bits(
31242            tmp & PositionTargetTypemask::all().bits(),
31243        )
31244        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31245            flag_type: "PositionTargetTypemask",
31246            value: tmp as u32,
31247        })?;
31248        __struct.target_system = buf.get_u8();
31249        __struct.target_component = buf.get_u8();
31250        let tmp = buf.get_u8();
31251        __struct.coordinate_frame =
31252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31253                enum_type: "MavFrame",
31254                value: tmp as u32,
31255            })?;
31256        Ok(__struct)
31257    }
31258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31259        let mut __tmp = BytesMut::new(bytes);
31260        #[allow(clippy::absurd_extreme_comparisons)]
31261        #[allow(unused_comparisons)]
31262        if __tmp.remaining() < Self::ENCODED_LEN {
31263            panic!(
31264                "buffer is too small (need {} bytes, but got {})",
31265                Self::ENCODED_LEN,
31266                __tmp.remaining(),
31267            )
31268        }
31269        __tmp.put_u32_le(self.time_boot_ms);
31270        __tmp.put_f32_le(self.x);
31271        __tmp.put_f32_le(self.y);
31272        __tmp.put_f32_le(self.z);
31273        __tmp.put_f32_le(self.vx);
31274        __tmp.put_f32_le(self.vy);
31275        __tmp.put_f32_le(self.vz);
31276        __tmp.put_f32_le(self.afx);
31277        __tmp.put_f32_le(self.afy);
31278        __tmp.put_f32_le(self.afz);
31279        __tmp.put_f32_le(self.yaw);
31280        __tmp.put_f32_le(self.yaw_rate);
31281        __tmp.put_u16_le(self.type_mask.bits());
31282        __tmp.put_u8(self.target_system);
31283        __tmp.put_u8(self.target_component);
31284        __tmp.put_u8(self.coordinate_frame as u8);
31285        if matches!(version, MavlinkVersion::V2) {
31286            let len = __tmp.len();
31287            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31288        } else {
31289            __tmp.len()
31290        }
31291    }
31292}
31293#[doc = "Status of simulation environment, if used."]
31294#[doc = ""]
31295#[doc = "ID: 108"]
31296#[derive(Debug, Clone, PartialEq)]
31297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31299#[cfg_attr(feature = "ts", derive(TS))]
31300#[cfg_attr(feature = "ts", ts(export))]
31301pub struct SIM_STATE_DATA {
31302    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
31303    pub q1: f32,
31304    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
31305    pub q2: f32,
31306    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
31307    pub q3: f32,
31308    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
31309    pub q4: f32,
31310    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
31311    pub roll: f32,
31312    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
31313    pub pitch: f32,
31314    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
31315    pub yaw: f32,
31316    #[doc = "X acceleration"]
31317    pub xacc: f32,
31318    #[doc = "Y acceleration"]
31319    pub yacc: f32,
31320    #[doc = "Z acceleration"]
31321    pub zacc: f32,
31322    #[doc = "Angular speed around X axis"]
31323    pub xgyro: f32,
31324    #[doc = "Angular speed around Y axis"]
31325    pub ygyro: f32,
31326    #[doc = "Angular speed around Z axis"]
31327    pub zgyro: f32,
31328    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
31329    pub lat: f32,
31330    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
31331    pub lon: f32,
31332    #[doc = "Altitude"]
31333    pub alt: f32,
31334    #[doc = "Horizontal position standard deviation"]
31335    pub std_dev_horz: f32,
31336    #[doc = "Vertical position standard deviation"]
31337    pub std_dev_vert: f32,
31338    #[doc = "True velocity in north direction in earth-fixed NED frame"]
31339    pub vn: f32,
31340    #[doc = "True velocity in east direction in earth-fixed NED frame"]
31341    pub ve: f32,
31342    #[doc = "True velocity in down direction in earth-fixed NED frame"]
31343    pub vd: f32,
31344    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
31345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31346    pub lat_int: i32,
31347    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
31348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31349    pub lon_int: i32,
31350}
31351impl SIM_STATE_DATA {
31352    pub const ENCODED_LEN: usize = 92usize;
31353    pub const DEFAULT: Self = Self {
31354        q1: 0.0_f32,
31355        q2: 0.0_f32,
31356        q3: 0.0_f32,
31357        q4: 0.0_f32,
31358        roll: 0.0_f32,
31359        pitch: 0.0_f32,
31360        yaw: 0.0_f32,
31361        xacc: 0.0_f32,
31362        yacc: 0.0_f32,
31363        zacc: 0.0_f32,
31364        xgyro: 0.0_f32,
31365        ygyro: 0.0_f32,
31366        zgyro: 0.0_f32,
31367        lat: 0.0_f32,
31368        lon: 0.0_f32,
31369        alt: 0.0_f32,
31370        std_dev_horz: 0.0_f32,
31371        std_dev_vert: 0.0_f32,
31372        vn: 0.0_f32,
31373        ve: 0.0_f32,
31374        vd: 0.0_f32,
31375        lat_int: 0_i32,
31376        lon_int: 0_i32,
31377    };
31378    #[cfg(feature = "arbitrary")]
31379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31380        use arbitrary::{Arbitrary, Unstructured};
31381        let mut buf = [0u8; 1024];
31382        rng.fill_bytes(&mut buf);
31383        let mut unstructured = Unstructured::new(&buf);
31384        Self::arbitrary(&mut unstructured).unwrap_or_default()
31385    }
31386}
31387impl Default for SIM_STATE_DATA {
31388    fn default() -> Self {
31389        Self::DEFAULT.clone()
31390    }
31391}
31392impl MessageData for SIM_STATE_DATA {
31393    type Message = MavMessage;
31394    const ID: u32 = 108u32;
31395    const NAME: &'static str = "SIM_STATE";
31396    const EXTRA_CRC: u8 = 32u8;
31397    const ENCODED_LEN: usize = 92usize;
31398    fn deser(
31399        _version: MavlinkVersion,
31400        __input: &[u8],
31401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31402        let avail_len = __input.len();
31403        let mut payload_buf = [0; Self::ENCODED_LEN];
31404        let mut buf = if avail_len < Self::ENCODED_LEN {
31405            payload_buf[0..avail_len].copy_from_slice(__input);
31406            Bytes::new(&payload_buf)
31407        } else {
31408            Bytes::new(__input)
31409        };
31410        let mut __struct = Self::default();
31411        __struct.q1 = buf.get_f32_le();
31412        __struct.q2 = buf.get_f32_le();
31413        __struct.q3 = buf.get_f32_le();
31414        __struct.q4 = buf.get_f32_le();
31415        __struct.roll = buf.get_f32_le();
31416        __struct.pitch = buf.get_f32_le();
31417        __struct.yaw = buf.get_f32_le();
31418        __struct.xacc = buf.get_f32_le();
31419        __struct.yacc = buf.get_f32_le();
31420        __struct.zacc = buf.get_f32_le();
31421        __struct.xgyro = buf.get_f32_le();
31422        __struct.ygyro = buf.get_f32_le();
31423        __struct.zgyro = buf.get_f32_le();
31424        __struct.lat = buf.get_f32_le();
31425        __struct.lon = buf.get_f32_le();
31426        __struct.alt = buf.get_f32_le();
31427        __struct.std_dev_horz = buf.get_f32_le();
31428        __struct.std_dev_vert = buf.get_f32_le();
31429        __struct.vn = buf.get_f32_le();
31430        __struct.ve = buf.get_f32_le();
31431        __struct.vd = buf.get_f32_le();
31432        __struct.lat_int = buf.get_i32_le();
31433        __struct.lon_int = buf.get_i32_le();
31434        Ok(__struct)
31435    }
31436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31437        let mut __tmp = BytesMut::new(bytes);
31438        #[allow(clippy::absurd_extreme_comparisons)]
31439        #[allow(unused_comparisons)]
31440        if __tmp.remaining() < Self::ENCODED_LEN {
31441            panic!(
31442                "buffer is too small (need {} bytes, but got {})",
31443                Self::ENCODED_LEN,
31444                __tmp.remaining(),
31445            )
31446        }
31447        __tmp.put_f32_le(self.q1);
31448        __tmp.put_f32_le(self.q2);
31449        __tmp.put_f32_le(self.q3);
31450        __tmp.put_f32_le(self.q4);
31451        __tmp.put_f32_le(self.roll);
31452        __tmp.put_f32_le(self.pitch);
31453        __tmp.put_f32_le(self.yaw);
31454        __tmp.put_f32_le(self.xacc);
31455        __tmp.put_f32_le(self.yacc);
31456        __tmp.put_f32_le(self.zacc);
31457        __tmp.put_f32_le(self.xgyro);
31458        __tmp.put_f32_le(self.ygyro);
31459        __tmp.put_f32_le(self.zgyro);
31460        __tmp.put_f32_le(self.lat);
31461        __tmp.put_f32_le(self.lon);
31462        __tmp.put_f32_le(self.alt);
31463        __tmp.put_f32_le(self.std_dev_horz);
31464        __tmp.put_f32_le(self.std_dev_vert);
31465        __tmp.put_f32_le(self.vn);
31466        __tmp.put_f32_le(self.ve);
31467        __tmp.put_f32_le(self.vd);
31468        if matches!(version, MavlinkVersion::V2) {
31469            __tmp.put_i32_le(self.lat_int);
31470            __tmp.put_i32_le(self.lon_int);
31471            let len = __tmp.len();
31472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31473        } else {
31474            __tmp.len()
31475        }
31476    }
31477}
31478#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
31479#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
31480#[doc = ""]
31481#[doc = "ID: 370"]
31482#[derive(Debug, Clone, PartialEq)]
31483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31485#[cfg_attr(feature = "ts", derive(TS))]
31486#[cfg_attr(feature = "ts", ts(export))]
31487pub struct SMART_BATTERY_INFO_DATA {
31488    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
31489    pub capacity_full_specification: i32,
31490    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
31491    pub capacity_full: i32,
31492    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
31493    pub cycle_count: u16,
31494    #[doc = "Battery weight. 0: field not provided."]
31495    pub weight: u16,
31496    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
31497    pub discharge_minimum_voltage: u16,
31498    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
31499    pub charging_minimum_voltage: u16,
31500    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
31501    pub resting_minimum_voltage: u16,
31502    #[doc = "Battery ID"]
31503    pub id: u8,
31504    #[doc = "Function of the battery"]
31505    pub battery_function: MavBatteryFunction,
31506    #[doc = "Type (chemistry) of the battery"]
31507    pub mavtype: MavBatteryType,
31508    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
31509    #[cfg_attr(feature = "ts", ts(type = "string"))]
31510    pub serial_number: CharArray<16>,
31511    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
31512    #[cfg_attr(feature = "ts", ts(type = "string"))]
31513    pub device_name: CharArray<50>,
31514    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
31515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31516    pub charging_maximum_voltage: u16,
31517    #[doc = "Number of battery cells in series. 0: field not provided."]
31518    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31519    pub cells_in_series: u8,
31520    #[doc = "Maximum pack discharge current. 0: field not provided."]
31521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31522    pub discharge_maximum_current: u32,
31523    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
31524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31525    pub discharge_maximum_burst_current: u32,
31526    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
31527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31528    #[cfg_attr(feature = "ts", ts(type = "string"))]
31529    pub manufacture_date: CharArray<11>,
31530}
31531impl SMART_BATTERY_INFO_DATA {
31532    pub const ENCODED_LEN: usize = 109usize;
31533    pub const DEFAULT: Self = Self {
31534        capacity_full_specification: 0_i32,
31535        capacity_full: 0_i32,
31536        cycle_count: 0_u16,
31537        weight: 0_u16,
31538        discharge_minimum_voltage: 0_u16,
31539        charging_minimum_voltage: 0_u16,
31540        resting_minimum_voltage: 0_u16,
31541        id: 0_u8,
31542        battery_function: MavBatteryFunction::DEFAULT,
31543        mavtype: MavBatteryType::DEFAULT,
31544        serial_number: CharArray::new([0_u8; 16usize]),
31545        device_name: CharArray::new([0_u8; 50usize]),
31546        charging_maximum_voltage: 0_u16,
31547        cells_in_series: 0_u8,
31548        discharge_maximum_current: 0_u32,
31549        discharge_maximum_burst_current: 0_u32,
31550        manufacture_date: CharArray::new([0_u8; 11usize]),
31551    };
31552    #[cfg(feature = "arbitrary")]
31553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31554        use arbitrary::{Arbitrary, Unstructured};
31555        let mut buf = [0u8; 1024];
31556        rng.fill_bytes(&mut buf);
31557        let mut unstructured = Unstructured::new(&buf);
31558        Self::arbitrary(&mut unstructured).unwrap_or_default()
31559    }
31560}
31561impl Default for SMART_BATTERY_INFO_DATA {
31562    fn default() -> Self {
31563        Self::DEFAULT.clone()
31564    }
31565}
31566impl MessageData for SMART_BATTERY_INFO_DATA {
31567    type Message = MavMessage;
31568    const ID: u32 = 370u32;
31569    const NAME: &'static str = "SMART_BATTERY_INFO";
31570    const EXTRA_CRC: u8 = 75u8;
31571    const ENCODED_LEN: usize = 109usize;
31572    fn deser(
31573        _version: MavlinkVersion,
31574        __input: &[u8],
31575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31576        let avail_len = __input.len();
31577        let mut payload_buf = [0; Self::ENCODED_LEN];
31578        let mut buf = if avail_len < Self::ENCODED_LEN {
31579            payload_buf[0..avail_len].copy_from_slice(__input);
31580            Bytes::new(&payload_buf)
31581        } else {
31582            Bytes::new(__input)
31583        };
31584        let mut __struct = Self::default();
31585        __struct.capacity_full_specification = buf.get_i32_le();
31586        __struct.capacity_full = buf.get_i32_le();
31587        __struct.cycle_count = buf.get_u16_le();
31588        __struct.weight = buf.get_u16_le();
31589        __struct.discharge_minimum_voltage = buf.get_u16_le();
31590        __struct.charging_minimum_voltage = buf.get_u16_le();
31591        __struct.resting_minimum_voltage = buf.get_u16_le();
31592        __struct.id = buf.get_u8();
31593        let tmp = buf.get_u8();
31594        __struct.battery_function =
31595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31596                enum_type: "MavBatteryFunction",
31597                value: tmp as u32,
31598            })?;
31599        let tmp = buf.get_u8();
31600        __struct.mavtype =
31601            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31602                enum_type: "MavBatteryType",
31603                value: tmp as u32,
31604            })?;
31605        let mut tmp = [0_u8; 16usize];
31606        for v in &mut tmp {
31607            *v = buf.get_u8();
31608        }
31609        __struct.serial_number = CharArray::new(tmp);
31610        let mut tmp = [0_u8; 50usize];
31611        for v in &mut tmp {
31612            *v = buf.get_u8();
31613        }
31614        __struct.device_name = CharArray::new(tmp);
31615        __struct.charging_maximum_voltage = buf.get_u16_le();
31616        __struct.cells_in_series = buf.get_u8();
31617        __struct.discharge_maximum_current = buf.get_u32_le();
31618        __struct.discharge_maximum_burst_current = buf.get_u32_le();
31619        let mut tmp = [0_u8; 11usize];
31620        for v in &mut tmp {
31621            *v = buf.get_u8();
31622        }
31623        __struct.manufacture_date = CharArray::new(tmp);
31624        Ok(__struct)
31625    }
31626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31627        let mut __tmp = BytesMut::new(bytes);
31628        #[allow(clippy::absurd_extreme_comparisons)]
31629        #[allow(unused_comparisons)]
31630        if __tmp.remaining() < Self::ENCODED_LEN {
31631            panic!(
31632                "buffer is too small (need {} bytes, but got {})",
31633                Self::ENCODED_LEN,
31634                __tmp.remaining(),
31635            )
31636        }
31637        __tmp.put_i32_le(self.capacity_full_specification);
31638        __tmp.put_i32_le(self.capacity_full);
31639        __tmp.put_u16_le(self.cycle_count);
31640        __tmp.put_u16_le(self.weight);
31641        __tmp.put_u16_le(self.discharge_minimum_voltage);
31642        __tmp.put_u16_le(self.charging_minimum_voltage);
31643        __tmp.put_u16_le(self.resting_minimum_voltage);
31644        __tmp.put_u8(self.id);
31645        __tmp.put_u8(self.battery_function as u8);
31646        __tmp.put_u8(self.mavtype as u8);
31647        for val in &self.serial_number {
31648            __tmp.put_u8(*val);
31649        }
31650        for val in &self.device_name {
31651            __tmp.put_u8(*val);
31652        }
31653        if matches!(version, MavlinkVersion::V2) {
31654            __tmp.put_u16_le(self.charging_maximum_voltage);
31655            __tmp.put_u8(self.cells_in_series);
31656            __tmp.put_u32_le(self.discharge_maximum_current);
31657            __tmp.put_u32_le(self.discharge_maximum_burst_current);
31658            for val in &self.manufacture_date {
31659                __tmp.put_u8(*val);
31660            }
31661            let len = __tmp.len();
31662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31663        } else {
31664            __tmp.len()
31665        }
31666    }
31667}
31668#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
31669#[doc = ""]
31670#[doc = "ID: 253"]
31671#[derive(Debug, Clone, PartialEq)]
31672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31674#[cfg_attr(feature = "ts", derive(TS))]
31675#[cfg_attr(feature = "ts", ts(export))]
31676pub struct STATUSTEXT_DATA {
31677    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
31678    pub severity: MavSeverity,
31679    #[doc = "Status text message, without null termination character"]
31680    #[cfg_attr(feature = "ts", ts(type = "string"))]
31681    pub text: CharArray<50>,
31682    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
31683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31684    pub id: u16,
31685    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
31686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31687    pub chunk_seq: u8,
31688}
31689impl STATUSTEXT_DATA {
31690    pub const ENCODED_LEN: usize = 54usize;
31691    pub const DEFAULT: Self = Self {
31692        severity: MavSeverity::DEFAULT,
31693        text: CharArray::new([0_u8; 50usize]),
31694        id: 0_u16,
31695        chunk_seq: 0_u8,
31696    };
31697    #[cfg(feature = "arbitrary")]
31698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31699        use arbitrary::{Arbitrary, Unstructured};
31700        let mut buf = [0u8; 1024];
31701        rng.fill_bytes(&mut buf);
31702        let mut unstructured = Unstructured::new(&buf);
31703        Self::arbitrary(&mut unstructured).unwrap_or_default()
31704    }
31705}
31706impl Default for STATUSTEXT_DATA {
31707    fn default() -> Self {
31708        Self::DEFAULT.clone()
31709    }
31710}
31711impl MessageData for STATUSTEXT_DATA {
31712    type Message = MavMessage;
31713    const ID: u32 = 253u32;
31714    const NAME: &'static str = "STATUSTEXT";
31715    const EXTRA_CRC: u8 = 83u8;
31716    const ENCODED_LEN: usize = 54usize;
31717    fn deser(
31718        _version: MavlinkVersion,
31719        __input: &[u8],
31720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31721        let avail_len = __input.len();
31722        let mut payload_buf = [0; Self::ENCODED_LEN];
31723        let mut buf = if avail_len < Self::ENCODED_LEN {
31724            payload_buf[0..avail_len].copy_from_slice(__input);
31725            Bytes::new(&payload_buf)
31726        } else {
31727            Bytes::new(__input)
31728        };
31729        let mut __struct = Self::default();
31730        let tmp = buf.get_u8();
31731        __struct.severity =
31732            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31733                enum_type: "MavSeverity",
31734                value: tmp as u32,
31735            })?;
31736        let mut tmp = [0_u8; 50usize];
31737        for v in &mut tmp {
31738            *v = buf.get_u8();
31739        }
31740        __struct.text = CharArray::new(tmp);
31741        __struct.id = buf.get_u16_le();
31742        __struct.chunk_seq = buf.get_u8();
31743        Ok(__struct)
31744    }
31745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31746        let mut __tmp = BytesMut::new(bytes);
31747        #[allow(clippy::absurd_extreme_comparisons)]
31748        #[allow(unused_comparisons)]
31749        if __tmp.remaining() < Self::ENCODED_LEN {
31750            panic!(
31751                "buffer is too small (need {} bytes, but got {})",
31752                Self::ENCODED_LEN,
31753                __tmp.remaining(),
31754            )
31755        }
31756        __tmp.put_u8(self.severity as u8);
31757        for val in &self.text {
31758            __tmp.put_u8(*val);
31759        }
31760        if matches!(version, MavlinkVersion::V2) {
31761            __tmp.put_u16_le(self.id);
31762            __tmp.put_u8(self.chunk_seq);
31763            let len = __tmp.len();
31764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31765        } else {
31766            __tmp.len()
31767        }
31768    }
31769}
31770#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
31771#[doc = ""]
31772#[doc = "ID: 261"]
31773#[derive(Debug, Clone, PartialEq)]
31774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31776#[cfg_attr(feature = "ts", derive(TS))]
31777#[cfg_attr(feature = "ts", ts(export))]
31778pub struct STORAGE_INFORMATION_DATA {
31779    #[doc = "Timestamp (time since system boot)."]
31780    pub time_boot_ms: u32,
31781    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31782    pub total_capacity: f32,
31783    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31784    pub used_capacity: f32,
31785    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31786    pub available_capacity: f32,
31787    #[doc = "Read speed."]
31788    pub read_speed: f32,
31789    #[doc = "Write speed."]
31790    pub write_speed: f32,
31791    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
31792    pub storage_id: u8,
31793    #[doc = "Number of storage devices"]
31794    pub storage_count: u8,
31795    #[doc = "Status of storage"]
31796    pub status: StorageStatus,
31797    #[doc = "Type of storage"]
31798    #[cfg_attr(feature = "serde", serde(default))]
31799    pub mavtype: StorageType,
31800    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
31801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31802    #[cfg_attr(feature = "ts", ts(type = "string"))]
31803    pub name: CharArray<32>,
31804    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
31805    #[cfg_attr(feature = "serde", serde(default))]
31806    pub storage_usage: StorageUsageFlag,
31807}
31808impl STORAGE_INFORMATION_DATA {
31809    pub const ENCODED_LEN: usize = 61usize;
31810    pub const DEFAULT: Self = Self {
31811        time_boot_ms: 0_u32,
31812        total_capacity: 0.0_f32,
31813        used_capacity: 0.0_f32,
31814        available_capacity: 0.0_f32,
31815        read_speed: 0.0_f32,
31816        write_speed: 0.0_f32,
31817        storage_id: 0_u8,
31818        storage_count: 0_u8,
31819        status: StorageStatus::DEFAULT,
31820        mavtype: StorageType::DEFAULT,
31821        name: CharArray::new([0_u8; 32usize]),
31822        storage_usage: StorageUsageFlag::DEFAULT,
31823    };
31824    #[cfg(feature = "arbitrary")]
31825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31826        use arbitrary::{Arbitrary, Unstructured};
31827        let mut buf = [0u8; 1024];
31828        rng.fill_bytes(&mut buf);
31829        let mut unstructured = Unstructured::new(&buf);
31830        Self::arbitrary(&mut unstructured).unwrap_or_default()
31831    }
31832}
31833impl Default for STORAGE_INFORMATION_DATA {
31834    fn default() -> Self {
31835        Self::DEFAULT.clone()
31836    }
31837}
31838impl MessageData for STORAGE_INFORMATION_DATA {
31839    type Message = MavMessage;
31840    const ID: u32 = 261u32;
31841    const NAME: &'static str = "STORAGE_INFORMATION";
31842    const EXTRA_CRC: u8 = 179u8;
31843    const ENCODED_LEN: usize = 61usize;
31844    fn deser(
31845        _version: MavlinkVersion,
31846        __input: &[u8],
31847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31848        let avail_len = __input.len();
31849        let mut payload_buf = [0; Self::ENCODED_LEN];
31850        let mut buf = if avail_len < Self::ENCODED_LEN {
31851            payload_buf[0..avail_len].copy_from_slice(__input);
31852            Bytes::new(&payload_buf)
31853        } else {
31854            Bytes::new(__input)
31855        };
31856        let mut __struct = Self::default();
31857        __struct.time_boot_ms = buf.get_u32_le();
31858        __struct.total_capacity = buf.get_f32_le();
31859        __struct.used_capacity = buf.get_f32_le();
31860        __struct.available_capacity = buf.get_f32_le();
31861        __struct.read_speed = buf.get_f32_le();
31862        __struct.write_speed = buf.get_f32_le();
31863        __struct.storage_id = buf.get_u8();
31864        __struct.storage_count = buf.get_u8();
31865        let tmp = buf.get_u8();
31866        __struct.status =
31867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31868                enum_type: "StorageStatus",
31869                value: tmp as u32,
31870            })?;
31871        let tmp = buf.get_u8();
31872        __struct.mavtype =
31873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31874                enum_type: "StorageType",
31875                value: tmp as u32,
31876            })?;
31877        let mut tmp = [0_u8; 32usize];
31878        for v in &mut tmp {
31879            *v = buf.get_u8();
31880        }
31881        __struct.name = CharArray::new(tmp);
31882        let tmp = buf.get_u8();
31883        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
31884            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31885                flag_type: "StorageUsageFlag",
31886                value: tmp as u32,
31887            })?;
31888        Ok(__struct)
31889    }
31890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31891        let mut __tmp = BytesMut::new(bytes);
31892        #[allow(clippy::absurd_extreme_comparisons)]
31893        #[allow(unused_comparisons)]
31894        if __tmp.remaining() < Self::ENCODED_LEN {
31895            panic!(
31896                "buffer is too small (need {} bytes, but got {})",
31897                Self::ENCODED_LEN,
31898                __tmp.remaining(),
31899            )
31900        }
31901        __tmp.put_u32_le(self.time_boot_ms);
31902        __tmp.put_f32_le(self.total_capacity);
31903        __tmp.put_f32_le(self.used_capacity);
31904        __tmp.put_f32_le(self.available_capacity);
31905        __tmp.put_f32_le(self.read_speed);
31906        __tmp.put_f32_le(self.write_speed);
31907        __tmp.put_u8(self.storage_id);
31908        __tmp.put_u8(self.storage_count);
31909        __tmp.put_u8(self.status as u8);
31910        if matches!(version, MavlinkVersion::V2) {
31911            __tmp.put_u8(self.mavtype as u8);
31912            for val in &self.name {
31913                __tmp.put_u8(*val);
31914            }
31915            __tmp.put_u8(self.storage_usage.bits());
31916            let len = __tmp.len();
31917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31918        } else {
31919            __tmp.len()
31920        }
31921    }
31922}
31923#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31924#[doc = ""]
31925#[doc = "ID: 401"]
31926#[derive(Debug, Clone, PartialEq)]
31927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31929#[cfg_attr(feature = "ts", derive(TS))]
31930#[cfg_attr(feature = "ts", ts(export))]
31931pub struct SUPPORTED_TUNES_DATA {
31932    #[doc = "Bitfield of supported tune formats."]
31933    pub format: TuneFormat,
31934    #[doc = "System ID"]
31935    pub target_system: u8,
31936    #[doc = "Component ID"]
31937    pub target_component: u8,
31938}
31939impl SUPPORTED_TUNES_DATA {
31940    pub const ENCODED_LEN: usize = 6usize;
31941    pub const DEFAULT: Self = Self {
31942        format: TuneFormat::DEFAULT,
31943        target_system: 0_u8,
31944        target_component: 0_u8,
31945    };
31946    #[cfg(feature = "arbitrary")]
31947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31948        use arbitrary::{Arbitrary, Unstructured};
31949        let mut buf = [0u8; 1024];
31950        rng.fill_bytes(&mut buf);
31951        let mut unstructured = Unstructured::new(&buf);
31952        Self::arbitrary(&mut unstructured).unwrap_or_default()
31953    }
31954}
31955impl Default for SUPPORTED_TUNES_DATA {
31956    fn default() -> Self {
31957        Self::DEFAULT.clone()
31958    }
31959}
31960impl MessageData for SUPPORTED_TUNES_DATA {
31961    type Message = MavMessage;
31962    const ID: u32 = 401u32;
31963    const NAME: &'static str = "SUPPORTED_TUNES";
31964    const EXTRA_CRC: u8 = 183u8;
31965    const ENCODED_LEN: usize = 6usize;
31966    fn deser(
31967        _version: MavlinkVersion,
31968        __input: &[u8],
31969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31970        let avail_len = __input.len();
31971        let mut payload_buf = [0; Self::ENCODED_LEN];
31972        let mut buf = if avail_len < Self::ENCODED_LEN {
31973            payload_buf[0..avail_len].copy_from_slice(__input);
31974            Bytes::new(&payload_buf)
31975        } else {
31976            Bytes::new(__input)
31977        };
31978        let mut __struct = Self::default();
31979        let tmp = buf.get_u32_le();
31980        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31981            ::mavlink_core::error::ParserError::InvalidEnum {
31982                enum_type: "TuneFormat",
31983                value: tmp as u32,
31984            },
31985        )?;
31986        __struct.target_system = buf.get_u8();
31987        __struct.target_component = buf.get_u8();
31988        Ok(__struct)
31989    }
31990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31991        let mut __tmp = BytesMut::new(bytes);
31992        #[allow(clippy::absurd_extreme_comparisons)]
31993        #[allow(unused_comparisons)]
31994        if __tmp.remaining() < Self::ENCODED_LEN {
31995            panic!(
31996                "buffer is too small (need {} bytes, but got {})",
31997                Self::ENCODED_LEN,
31998                __tmp.remaining(),
31999            )
32000        }
32001        __tmp.put_u32_le(self.format as u32);
32002        __tmp.put_u8(self.target_system);
32003        __tmp.put_u8(self.target_component);
32004        if matches!(version, MavlinkVersion::V2) {
32005            let len = __tmp.len();
32006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32007        } else {
32008            __tmp.len()
32009        }
32010    }
32011}
32012#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
32013#[doc = ""]
32014#[doc = "ID: 2"]
32015#[derive(Debug, Clone, PartialEq)]
32016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32018#[cfg_attr(feature = "ts", derive(TS))]
32019#[cfg_attr(feature = "ts", ts(export))]
32020pub struct SYSTEM_TIME_DATA {
32021    #[doc = "Timestamp (UNIX epoch time)."]
32022    pub time_unix_usec: u64,
32023    #[doc = "Timestamp (time since system boot)."]
32024    pub time_boot_ms: u32,
32025}
32026impl SYSTEM_TIME_DATA {
32027    pub const ENCODED_LEN: usize = 12usize;
32028    pub const DEFAULT: Self = Self {
32029        time_unix_usec: 0_u64,
32030        time_boot_ms: 0_u32,
32031    };
32032    #[cfg(feature = "arbitrary")]
32033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32034        use arbitrary::{Arbitrary, Unstructured};
32035        let mut buf = [0u8; 1024];
32036        rng.fill_bytes(&mut buf);
32037        let mut unstructured = Unstructured::new(&buf);
32038        Self::arbitrary(&mut unstructured).unwrap_or_default()
32039    }
32040}
32041impl Default for SYSTEM_TIME_DATA {
32042    fn default() -> Self {
32043        Self::DEFAULT.clone()
32044    }
32045}
32046impl MessageData for SYSTEM_TIME_DATA {
32047    type Message = MavMessage;
32048    const ID: u32 = 2u32;
32049    const NAME: &'static str = "SYSTEM_TIME";
32050    const EXTRA_CRC: u8 = 137u8;
32051    const ENCODED_LEN: usize = 12usize;
32052    fn deser(
32053        _version: MavlinkVersion,
32054        __input: &[u8],
32055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32056        let avail_len = __input.len();
32057        let mut payload_buf = [0; Self::ENCODED_LEN];
32058        let mut buf = if avail_len < Self::ENCODED_LEN {
32059            payload_buf[0..avail_len].copy_from_slice(__input);
32060            Bytes::new(&payload_buf)
32061        } else {
32062            Bytes::new(__input)
32063        };
32064        let mut __struct = Self::default();
32065        __struct.time_unix_usec = buf.get_u64_le();
32066        __struct.time_boot_ms = buf.get_u32_le();
32067        Ok(__struct)
32068    }
32069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32070        let mut __tmp = BytesMut::new(bytes);
32071        #[allow(clippy::absurd_extreme_comparisons)]
32072        #[allow(unused_comparisons)]
32073        if __tmp.remaining() < Self::ENCODED_LEN {
32074            panic!(
32075                "buffer is too small (need {} bytes, but got {})",
32076                Self::ENCODED_LEN,
32077                __tmp.remaining(),
32078            )
32079        }
32080        __tmp.put_u64_le(self.time_unix_usec);
32081        __tmp.put_u32_le(self.time_boot_ms);
32082        if matches!(version, MavlinkVersion::V2) {
32083            let len = __tmp.len();
32084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32085        } else {
32086            __tmp.len()
32087        }
32088    }
32089}
32090#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
32091#[doc = ""]
32092#[doc = "ID: 1"]
32093#[derive(Debug, Clone, PartialEq)]
32094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32096#[cfg_attr(feature = "ts", derive(TS))]
32097#[cfg_attr(feature = "ts", ts(export))]
32098pub struct SYS_STATUS_DATA {
32099    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
32100    pub onboard_control_sensors_present: MavSysStatusSensor,
32101    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
32102    pub onboard_control_sensors_enabled: MavSysStatusSensor,
32103    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
32104    pub onboard_control_sensors_health: MavSysStatusSensor,
32105    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
32106    pub load: u16,
32107    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
32108    pub voltage_battery: u16,
32109    #[doc = "Battery current, -1: Current not sent by autopilot"]
32110    pub current_battery: i16,
32111    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
32112    pub drop_rate_comm: u16,
32113    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
32114    pub errors_comm: u16,
32115    #[doc = "Autopilot-specific errors"]
32116    pub errors_count1: u16,
32117    #[doc = "Autopilot-specific errors"]
32118    pub errors_count2: u16,
32119    #[doc = "Autopilot-specific errors"]
32120    pub errors_count3: u16,
32121    #[doc = "Autopilot-specific errors"]
32122    pub errors_count4: u16,
32123    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
32124    pub battery_remaining: i8,
32125    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
32126    #[cfg_attr(feature = "serde", serde(default))]
32127    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
32128    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
32129    #[cfg_attr(feature = "serde", serde(default))]
32130    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
32131    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
32132    #[cfg_attr(feature = "serde", serde(default))]
32133    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
32134}
32135impl SYS_STATUS_DATA {
32136    pub const ENCODED_LEN: usize = 43usize;
32137    pub const DEFAULT: Self = Self {
32138        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
32139        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
32140        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
32141        load: 0_u16,
32142        voltage_battery: 0_u16,
32143        current_battery: 0_i16,
32144        drop_rate_comm: 0_u16,
32145        errors_comm: 0_u16,
32146        errors_count1: 0_u16,
32147        errors_count2: 0_u16,
32148        errors_count3: 0_u16,
32149        errors_count4: 0_u16,
32150        battery_remaining: 0_i8,
32151        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
32152        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
32153        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
32154    };
32155    #[cfg(feature = "arbitrary")]
32156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32157        use arbitrary::{Arbitrary, Unstructured};
32158        let mut buf = [0u8; 1024];
32159        rng.fill_bytes(&mut buf);
32160        let mut unstructured = Unstructured::new(&buf);
32161        Self::arbitrary(&mut unstructured).unwrap_or_default()
32162    }
32163}
32164impl Default for SYS_STATUS_DATA {
32165    fn default() -> Self {
32166        Self::DEFAULT.clone()
32167    }
32168}
32169impl MessageData for SYS_STATUS_DATA {
32170    type Message = MavMessage;
32171    const ID: u32 = 1u32;
32172    const NAME: &'static str = "SYS_STATUS";
32173    const EXTRA_CRC: u8 = 124u8;
32174    const ENCODED_LEN: usize = 43usize;
32175    fn deser(
32176        _version: MavlinkVersion,
32177        __input: &[u8],
32178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32179        let avail_len = __input.len();
32180        let mut payload_buf = [0; Self::ENCODED_LEN];
32181        let mut buf = if avail_len < Self::ENCODED_LEN {
32182            payload_buf[0..avail_len].copy_from_slice(__input);
32183            Bytes::new(&payload_buf)
32184        } else {
32185            Bytes::new(__input)
32186        };
32187        let mut __struct = Self::default();
32188        let tmp = buf.get_u32_le();
32189        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
32190            tmp & MavSysStatusSensor::all().bits(),
32191        )
32192        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32193            flag_type: "MavSysStatusSensor",
32194            value: tmp as u32,
32195        })?;
32196        let tmp = buf.get_u32_le();
32197        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
32198            tmp & MavSysStatusSensor::all().bits(),
32199        )
32200        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32201            flag_type: "MavSysStatusSensor",
32202            value: tmp as u32,
32203        })?;
32204        let tmp = buf.get_u32_le();
32205        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
32206            tmp & MavSysStatusSensor::all().bits(),
32207        )
32208        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32209            flag_type: "MavSysStatusSensor",
32210            value: tmp as u32,
32211        })?;
32212        __struct.load = buf.get_u16_le();
32213        __struct.voltage_battery = buf.get_u16_le();
32214        __struct.current_battery = buf.get_i16_le();
32215        __struct.drop_rate_comm = buf.get_u16_le();
32216        __struct.errors_comm = buf.get_u16_le();
32217        __struct.errors_count1 = buf.get_u16_le();
32218        __struct.errors_count2 = buf.get_u16_le();
32219        __struct.errors_count3 = buf.get_u16_le();
32220        __struct.errors_count4 = buf.get_u16_le();
32221        __struct.battery_remaining = buf.get_i8();
32222        let tmp = buf.get_u32_le();
32223        __struct.onboard_control_sensors_present_extended =
32224            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
32225                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32226                flag_type: "MavSysStatusSensorExtended",
32227                value: tmp as u32,
32228            })?;
32229        let tmp = buf.get_u32_le();
32230        __struct.onboard_control_sensors_enabled_extended =
32231            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
32232                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32233                flag_type: "MavSysStatusSensorExtended",
32234                value: tmp as u32,
32235            })?;
32236        let tmp = buf.get_u32_le();
32237        __struct.onboard_control_sensors_health_extended =
32238            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
32239                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32240                flag_type: "MavSysStatusSensorExtended",
32241                value: tmp as u32,
32242            })?;
32243        Ok(__struct)
32244    }
32245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32246        let mut __tmp = BytesMut::new(bytes);
32247        #[allow(clippy::absurd_extreme_comparisons)]
32248        #[allow(unused_comparisons)]
32249        if __tmp.remaining() < Self::ENCODED_LEN {
32250            panic!(
32251                "buffer is too small (need {} bytes, but got {})",
32252                Self::ENCODED_LEN,
32253                __tmp.remaining(),
32254            )
32255        }
32256        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
32257        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
32258        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
32259        __tmp.put_u16_le(self.load);
32260        __tmp.put_u16_le(self.voltage_battery);
32261        __tmp.put_i16_le(self.current_battery);
32262        __tmp.put_u16_le(self.drop_rate_comm);
32263        __tmp.put_u16_le(self.errors_comm);
32264        __tmp.put_u16_le(self.errors_count1);
32265        __tmp.put_u16_le(self.errors_count2);
32266        __tmp.put_u16_le(self.errors_count3);
32267        __tmp.put_u16_le(self.errors_count4);
32268        __tmp.put_i8(self.battery_remaining);
32269        if matches!(version, MavlinkVersion::V2) {
32270            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
32271            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
32272            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
32273            let len = __tmp.len();
32274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32275        } else {
32276            __tmp.len()
32277        }
32278    }
32279}
32280#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
32281#[doc = ""]
32282#[doc = "ID: 135"]
32283#[derive(Debug, Clone, PartialEq)]
32284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32286#[cfg_attr(feature = "ts", derive(TS))]
32287#[cfg_attr(feature = "ts", ts(export))]
32288pub struct TERRAIN_CHECK_DATA {
32289    #[doc = "Latitude"]
32290    pub lat: i32,
32291    #[doc = "Longitude"]
32292    pub lon: i32,
32293}
32294impl TERRAIN_CHECK_DATA {
32295    pub const ENCODED_LEN: usize = 8usize;
32296    pub const DEFAULT: Self = Self {
32297        lat: 0_i32,
32298        lon: 0_i32,
32299    };
32300    #[cfg(feature = "arbitrary")]
32301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32302        use arbitrary::{Arbitrary, Unstructured};
32303        let mut buf = [0u8; 1024];
32304        rng.fill_bytes(&mut buf);
32305        let mut unstructured = Unstructured::new(&buf);
32306        Self::arbitrary(&mut unstructured).unwrap_or_default()
32307    }
32308}
32309impl Default for TERRAIN_CHECK_DATA {
32310    fn default() -> Self {
32311        Self::DEFAULT.clone()
32312    }
32313}
32314impl MessageData for TERRAIN_CHECK_DATA {
32315    type Message = MavMessage;
32316    const ID: u32 = 135u32;
32317    const NAME: &'static str = "TERRAIN_CHECK";
32318    const EXTRA_CRC: u8 = 203u8;
32319    const ENCODED_LEN: usize = 8usize;
32320    fn deser(
32321        _version: MavlinkVersion,
32322        __input: &[u8],
32323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32324        let avail_len = __input.len();
32325        let mut payload_buf = [0; Self::ENCODED_LEN];
32326        let mut buf = if avail_len < Self::ENCODED_LEN {
32327            payload_buf[0..avail_len].copy_from_slice(__input);
32328            Bytes::new(&payload_buf)
32329        } else {
32330            Bytes::new(__input)
32331        };
32332        let mut __struct = Self::default();
32333        __struct.lat = buf.get_i32_le();
32334        __struct.lon = buf.get_i32_le();
32335        Ok(__struct)
32336    }
32337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32338        let mut __tmp = BytesMut::new(bytes);
32339        #[allow(clippy::absurd_extreme_comparisons)]
32340        #[allow(unused_comparisons)]
32341        if __tmp.remaining() < Self::ENCODED_LEN {
32342            panic!(
32343                "buffer is too small (need {} bytes, but got {})",
32344                Self::ENCODED_LEN,
32345                __tmp.remaining(),
32346            )
32347        }
32348        __tmp.put_i32_le(self.lat);
32349        __tmp.put_i32_le(self.lon);
32350        if matches!(version, MavlinkVersion::V2) {
32351            let len = __tmp.len();
32352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32353        } else {
32354            __tmp.len()
32355        }
32356    }
32357}
32358#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32359#[doc = ""]
32360#[doc = "ID: 134"]
32361#[derive(Debug, Clone, PartialEq)]
32362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32364#[cfg_attr(feature = "ts", derive(TS))]
32365#[cfg_attr(feature = "ts", ts(export))]
32366pub struct TERRAIN_DATA_DATA {
32367    #[doc = "Latitude of SW corner of first grid"]
32368    pub lat: i32,
32369    #[doc = "Longitude of SW corner of first grid"]
32370    pub lon: i32,
32371    #[doc = "Grid spacing"]
32372    pub grid_spacing: u16,
32373    #[doc = "Terrain data MSL"]
32374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32375    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32376    pub data: [i16; 16],
32377    #[doc = "bit within the terrain request mask"]
32378    pub gridbit: u8,
32379}
32380impl TERRAIN_DATA_DATA {
32381    pub const ENCODED_LEN: usize = 43usize;
32382    pub const DEFAULT: Self = Self {
32383        lat: 0_i32,
32384        lon: 0_i32,
32385        grid_spacing: 0_u16,
32386        data: [0_i16; 16usize],
32387        gridbit: 0_u8,
32388    };
32389    #[cfg(feature = "arbitrary")]
32390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32391        use arbitrary::{Arbitrary, Unstructured};
32392        let mut buf = [0u8; 1024];
32393        rng.fill_bytes(&mut buf);
32394        let mut unstructured = Unstructured::new(&buf);
32395        Self::arbitrary(&mut unstructured).unwrap_or_default()
32396    }
32397}
32398impl Default for TERRAIN_DATA_DATA {
32399    fn default() -> Self {
32400        Self::DEFAULT.clone()
32401    }
32402}
32403impl MessageData for TERRAIN_DATA_DATA {
32404    type Message = MavMessage;
32405    const ID: u32 = 134u32;
32406    const NAME: &'static str = "TERRAIN_DATA";
32407    const EXTRA_CRC: u8 = 229u8;
32408    const ENCODED_LEN: usize = 43usize;
32409    fn deser(
32410        _version: MavlinkVersion,
32411        __input: &[u8],
32412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32413        let avail_len = __input.len();
32414        let mut payload_buf = [0; Self::ENCODED_LEN];
32415        let mut buf = if avail_len < Self::ENCODED_LEN {
32416            payload_buf[0..avail_len].copy_from_slice(__input);
32417            Bytes::new(&payload_buf)
32418        } else {
32419            Bytes::new(__input)
32420        };
32421        let mut __struct = Self::default();
32422        __struct.lat = buf.get_i32_le();
32423        __struct.lon = buf.get_i32_le();
32424        __struct.grid_spacing = buf.get_u16_le();
32425        for v in &mut __struct.data {
32426            let val = buf.get_i16_le();
32427            *v = val;
32428        }
32429        __struct.gridbit = buf.get_u8();
32430        Ok(__struct)
32431    }
32432    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32433        let mut __tmp = BytesMut::new(bytes);
32434        #[allow(clippy::absurd_extreme_comparisons)]
32435        #[allow(unused_comparisons)]
32436        if __tmp.remaining() < Self::ENCODED_LEN {
32437            panic!(
32438                "buffer is too small (need {} bytes, but got {})",
32439                Self::ENCODED_LEN,
32440                __tmp.remaining(),
32441            )
32442        }
32443        __tmp.put_i32_le(self.lat);
32444        __tmp.put_i32_le(self.lon);
32445        __tmp.put_u16_le(self.grid_spacing);
32446        for val in &self.data {
32447            __tmp.put_i16_le(*val);
32448        }
32449        __tmp.put_u8(self.gridbit);
32450        if matches!(version, MavlinkVersion::V2) {
32451            let len = __tmp.len();
32452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32453        } else {
32454            __tmp.len()
32455        }
32456    }
32457}
32458#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32459#[doc = ""]
32460#[doc = "ID: 136"]
32461#[derive(Debug, Clone, PartialEq)]
32462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32464#[cfg_attr(feature = "ts", derive(TS))]
32465#[cfg_attr(feature = "ts", ts(export))]
32466pub struct TERRAIN_REPORT_DATA {
32467    #[doc = "Latitude"]
32468    pub lat: i32,
32469    #[doc = "Longitude"]
32470    pub lon: i32,
32471    #[doc = "Terrain height MSL"]
32472    pub terrain_height: f32,
32473    #[doc = "Current vehicle height above lat/lon terrain height"]
32474    pub current_height: f32,
32475    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
32476    pub spacing: u16,
32477    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
32478    pub pending: u16,
32479    #[doc = "Number of 4x4 terrain blocks in memory"]
32480    pub loaded: u16,
32481}
32482impl TERRAIN_REPORT_DATA {
32483    pub const ENCODED_LEN: usize = 22usize;
32484    pub const DEFAULT: Self = Self {
32485        lat: 0_i32,
32486        lon: 0_i32,
32487        terrain_height: 0.0_f32,
32488        current_height: 0.0_f32,
32489        spacing: 0_u16,
32490        pending: 0_u16,
32491        loaded: 0_u16,
32492    };
32493    #[cfg(feature = "arbitrary")]
32494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32495        use arbitrary::{Arbitrary, Unstructured};
32496        let mut buf = [0u8; 1024];
32497        rng.fill_bytes(&mut buf);
32498        let mut unstructured = Unstructured::new(&buf);
32499        Self::arbitrary(&mut unstructured).unwrap_or_default()
32500    }
32501}
32502impl Default for TERRAIN_REPORT_DATA {
32503    fn default() -> Self {
32504        Self::DEFAULT.clone()
32505    }
32506}
32507impl MessageData for TERRAIN_REPORT_DATA {
32508    type Message = MavMessage;
32509    const ID: u32 = 136u32;
32510    const NAME: &'static str = "TERRAIN_REPORT";
32511    const EXTRA_CRC: u8 = 1u8;
32512    const ENCODED_LEN: usize = 22usize;
32513    fn deser(
32514        _version: MavlinkVersion,
32515        __input: &[u8],
32516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32517        let avail_len = __input.len();
32518        let mut payload_buf = [0; Self::ENCODED_LEN];
32519        let mut buf = if avail_len < Self::ENCODED_LEN {
32520            payload_buf[0..avail_len].copy_from_slice(__input);
32521            Bytes::new(&payload_buf)
32522        } else {
32523            Bytes::new(__input)
32524        };
32525        let mut __struct = Self::default();
32526        __struct.lat = buf.get_i32_le();
32527        __struct.lon = buf.get_i32_le();
32528        __struct.terrain_height = buf.get_f32_le();
32529        __struct.current_height = buf.get_f32_le();
32530        __struct.spacing = buf.get_u16_le();
32531        __struct.pending = buf.get_u16_le();
32532        __struct.loaded = buf.get_u16_le();
32533        Ok(__struct)
32534    }
32535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32536        let mut __tmp = BytesMut::new(bytes);
32537        #[allow(clippy::absurd_extreme_comparisons)]
32538        #[allow(unused_comparisons)]
32539        if __tmp.remaining() < Self::ENCODED_LEN {
32540            panic!(
32541                "buffer is too small (need {} bytes, but got {})",
32542                Self::ENCODED_LEN,
32543                __tmp.remaining(),
32544            )
32545        }
32546        __tmp.put_i32_le(self.lat);
32547        __tmp.put_i32_le(self.lon);
32548        __tmp.put_f32_le(self.terrain_height);
32549        __tmp.put_f32_le(self.current_height);
32550        __tmp.put_u16_le(self.spacing);
32551        __tmp.put_u16_le(self.pending);
32552        __tmp.put_u16_le(self.loaded);
32553        if matches!(version, MavlinkVersion::V2) {
32554            let len = __tmp.len();
32555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32556        } else {
32557            __tmp.len()
32558        }
32559    }
32560}
32561#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32562#[doc = ""]
32563#[doc = "ID: 133"]
32564#[derive(Debug, Clone, PartialEq)]
32565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32567#[cfg_attr(feature = "ts", derive(TS))]
32568#[cfg_attr(feature = "ts", ts(export))]
32569pub struct TERRAIN_REQUEST_DATA {
32570    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
32571    pub mask: u64,
32572    #[doc = "Latitude of SW corner of first grid"]
32573    pub lat: i32,
32574    #[doc = "Longitude of SW corner of first grid"]
32575    pub lon: i32,
32576    #[doc = "Grid spacing"]
32577    pub grid_spacing: u16,
32578}
32579impl TERRAIN_REQUEST_DATA {
32580    pub const ENCODED_LEN: usize = 18usize;
32581    pub const DEFAULT: Self = Self {
32582        mask: 0_u64,
32583        lat: 0_i32,
32584        lon: 0_i32,
32585        grid_spacing: 0_u16,
32586    };
32587    #[cfg(feature = "arbitrary")]
32588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32589        use arbitrary::{Arbitrary, Unstructured};
32590        let mut buf = [0u8; 1024];
32591        rng.fill_bytes(&mut buf);
32592        let mut unstructured = Unstructured::new(&buf);
32593        Self::arbitrary(&mut unstructured).unwrap_or_default()
32594    }
32595}
32596impl Default for TERRAIN_REQUEST_DATA {
32597    fn default() -> Self {
32598        Self::DEFAULT.clone()
32599    }
32600}
32601impl MessageData for TERRAIN_REQUEST_DATA {
32602    type Message = MavMessage;
32603    const ID: u32 = 133u32;
32604    const NAME: &'static str = "TERRAIN_REQUEST";
32605    const EXTRA_CRC: u8 = 6u8;
32606    const ENCODED_LEN: usize = 18usize;
32607    fn deser(
32608        _version: MavlinkVersion,
32609        __input: &[u8],
32610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32611        let avail_len = __input.len();
32612        let mut payload_buf = [0; Self::ENCODED_LEN];
32613        let mut buf = if avail_len < Self::ENCODED_LEN {
32614            payload_buf[0..avail_len].copy_from_slice(__input);
32615            Bytes::new(&payload_buf)
32616        } else {
32617            Bytes::new(__input)
32618        };
32619        let mut __struct = Self::default();
32620        __struct.mask = buf.get_u64_le();
32621        __struct.lat = buf.get_i32_le();
32622        __struct.lon = buf.get_i32_le();
32623        __struct.grid_spacing = buf.get_u16_le();
32624        Ok(__struct)
32625    }
32626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32627        let mut __tmp = BytesMut::new(bytes);
32628        #[allow(clippy::absurd_extreme_comparisons)]
32629        #[allow(unused_comparisons)]
32630        if __tmp.remaining() < Self::ENCODED_LEN {
32631            panic!(
32632                "buffer is too small (need {} bytes, but got {})",
32633                Self::ENCODED_LEN,
32634                __tmp.remaining(),
32635            )
32636        }
32637        __tmp.put_u64_le(self.mask);
32638        __tmp.put_i32_le(self.lat);
32639        __tmp.put_i32_le(self.lon);
32640        __tmp.put_u16_le(self.grid_spacing);
32641        if matches!(version, MavlinkVersion::V2) {
32642            let len = __tmp.len();
32643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32644        } else {
32645            __tmp.len()
32646        }
32647    }
32648}
32649#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
32650#[doc = ""]
32651#[doc = "ID: 111"]
32652#[derive(Debug, Clone, PartialEq)]
32653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32655#[cfg_attr(feature = "ts", derive(TS))]
32656#[cfg_attr(feature = "ts", ts(export))]
32657pub struct TIMESYNC_DATA {
32658    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
32659    pub tc1: i64,
32660    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
32661    pub ts1: i64,
32662    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
32663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32664    pub target_system: u8,
32665    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
32666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32667    pub target_component: u8,
32668}
32669impl TIMESYNC_DATA {
32670    pub const ENCODED_LEN: usize = 18usize;
32671    pub const DEFAULT: Self = Self {
32672        tc1: 0_i64,
32673        ts1: 0_i64,
32674        target_system: 0_u8,
32675        target_component: 0_u8,
32676    };
32677    #[cfg(feature = "arbitrary")]
32678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32679        use arbitrary::{Arbitrary, Unstructured};
32680        let mut buf = [0u8; 1024];
32681        rng.fill_bytes(&mut buf);
32682        let mut unstructured = Unstructured::new(&buf);
32683        Self::arbitrary(&mut unstructured).unwrap_or_default()
32684    }
32685}
32686impl Default for TIMESYNC_DATA {
32687    fn default() -> Self {
32688        Self::DEFAULT.clone()
32689    }
32690}
32691impl MessageData for TIMESYNC_DATA {
32692    type Message = MavMessage;
32693    const ID: u32 = 111u32;
32694    const NAME: &'static str = "TIMESYNC";
32695    const EXTRA_CRC: u8 = 34u8;
32696    const ENCODED_LEN: usize = 18usize;
32697    fn deser(
32698        _version: MavlinkVersion,
32699        __input: &[u8],
32700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32701        let avail_len = __input.len();
32702        let mut payload_buf = [0; Self::ENCODED_LEN];
32703        let mut buf = if avail_len < Self::ENCODED_LEN {
32704            payload_buf[0..avail_len].copy_from_slice(__input);
32705            Bytes::new(&payload_buf)
32706        } else {
32707            Bytes::new(__input)
32708        };
32709        let mut __struct = Self::default();
32710        __struct.tc1 = buf.get_i64_le();
32711        __struct.ts1 = buf.get_i64_le();
32712        __struct.target_system = buf.get_u8();
32713        __struct.target_component = buf.get_u8();
32714        Ok(__struct)
32715    }
32716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32717        let mut __tmp = BytesMut::new(bytes);
32718        #[allow(clippy::absurd_extreme_comparisons)]
32719        #[allow(unused_comparisons)]
32720        if __tmp.remaining() < Self::ENCODED_LEN {
32721            panic!(
32722                "buffer is too small (need {} bytes, but got {})",
32723                Self::ENCODED_LEN,
32724                __tmp.remaining(),
32725            )
32726        }
32727        __tmp.put_i64_le(self.tc1);
32728        __tmp.put_i64_le(self.ts1);
32729        if matches!(version, MavlinkVersion::V2) {
32730            __tmp.put_u8(self.target_system);
32731            __tmp.put_u8(self.target_component);
32732            let len = __tmp.len();
32733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32734        } else {
32735            __tmp.len()
32736        }
32737    }
32738}
32739#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32740#[doc = ""]
32741#[doc = "ID: 380"]
32742#[derive(Debug, Clone, PartialEq)]
32743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32745#[cfg_attr(feature = "ts", derive(TS))]
32746#[cfg_attr(feature = "ts", ts(export))]
32747pub struct TIME_ESTIMATE_TO_TARGET_DATA {
32748    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
32749    pub safe_return: i32,
32750    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
32751    pub land: i32,
32752    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
32753    pub mission_next_item: i32,
32754    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
32755    pub mission_end: i32,
32756    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
32757    pub commanded_action: i32,
32758}
32759impl TIME_ESTIMATE_TO_TARGET_DATA {
32760    pub const ENCODED_LEN: usize = 20usize;
32761    pub const DEFAULT: Self = Self {
32762        safe_return: 0_i32,
32763        land: 0_i32,
32764        mission_next_item: 0_i32,
32765        mission_end: 0_i32,
32766        commanded_action: 0_i32,
32767    };
32768    #[cfg(feature = "arbitrary")]
32769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32770        use arbitrary::{Arbitrary, Unstructured};
32771        let mut buf = [0u8; 1024];
32772        rng.fill_bytes(&mut buf);
32773        let mut unstructured = Unstructured::new(&buf);
32774        Self::arbitrary(&mut unstructured).unwrap_or_default()
32775    }
32776}
32777impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
32778    fn default() -> Self {
32779        Self::DEFAULT.clone()
32780    }
32781}
32782impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
32783    type Message = MavMessage;
32784    const ID: u32 = 380u32;
32785    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
32786    const EXTRA_CRC: u8 = 232u8;
32787    const ENCODED_LEN: usize = 20usize;
32788    fn deser(
32789        _version: MavlinkVersion,
32790        __input: &[u8],
32791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32792        let avail_len = __input.len();
32793        let mut payload_buf = [0; Self::ENCODED_LEN];
32794        let mut buf = if avail_len < Self::ENCODED_LEN {
32795            payload_buf[0..avail_len].copy_from_slice(__input);
32796            Bytes::new(&payload_buf)
32797        } else {
32798            Bytes::new(__input)
32799        };
32800        let mut __struct = Self::default();
32801        __struct.safe_return = buf.get_i32_le();
32802        __struct.land = buf.get_i32_le();
32803        __struct.mission_next_item = buf.get_i32_le();
32804        __struct.mission_end = buf.get_i32_le();
32805        __struct.commanded_action = buf.get_i32_le();
32806        Ok(__struct)
32807    }
32808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32809        let mut __tmp = BytesMut::new(bytes);
32810        #[allow(clippy::absurd_extreme_comparisons)]
32811        #[allow(unused_comparisons)]
32812        if __tmp.remaining() < Self::ENCODED_LEN {
32813            panic!(
32814                "buffer is too small (need {} bytes, but got {})",
32815                Self::ENCODED_LEN,
32816                __tmp.remaining(),
32817            )
32818        }
32819        __tmp.put_i32_le(self.safe_return);
32820        __tmp.put_i32_le(self.land);
32821        __tmp.put_i32_le(self.mission_next_item);
32822        __tmp.put_i32_le(self.mission_end);
32823        __tmp.put_i32_le(self.commanded_action);
32824        if matches!(version, MavlinkVersion::V2) {
32825            let len = __tmp.len();
32826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32827        } else {
32828            __tmp.len()
32829        }
32830    }
32831}
32832#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32833#[doc = ""]
32834#[doc = "ID: 333"]
32835#[derive(Debug, Clone, PartialEq)]
32836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32838#[cfg_attr(feature = "ts", derive(TS))]
32839#[cfg_attr(feature = "ts", ts(export))]
32840pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32841    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32842    pub time_usec: u64,
32843    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
32844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32845    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32846    pub pos_x: [f32; 5],
32847    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
32848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32850    pub pos_y: [f32; 5],
32851    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
32852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32853    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32854    pub pos_z: [f32; 5],
32855    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
32856    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32857    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32858    pub delta: [f32; 5],
32859    #[doc = "Yaw. Set to NaN for unchanged"]
32860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32862    pub pos_yaw: [f32; 5],
32863    #[doc = "Number of valid control points (up-to 5 points are possible)"]
32864    pub valid_points: u8,
32865}
32866impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32867    pub const ENCODED_LEN: usize = 109usize;
32868    pub const DEFAULT: Self = Self {
32869        time_usec: 0_u64,
32870        pos_x: [0.0_f32; 5usize],
32871        pos_y: [0.0_f32; 5usize],
32872        pos_z: [0.0_f32; 5usize],
32873        delta: [0.0_f32; 5usize],
32874        pos_yaw: [0.0_f32; 5usize],
32875        valid_points: 0_u8,
32876    };
32877    #[cfg(feature = "arbitrary")]
32878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32879        use arbitrary::{Arbitrary, Unstructured};
32880        let mut buf = [0u8; 1024];
32881        rng.fill_bytes(&mut buf);
32882        let mut unstructured = Unstructured::new(&buf);
32883        Self::arbitrary(&mut unstructured).unwrap_or_default()
32884    }
32885}
32886impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32887    fn default() -> Self {
32888        Self::DEFAULT.clone()
32889    }
32890}
32891impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32892    type Message = MavMessage;
32893    const ID: u32 = 333u32;
32894    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32895    const EXTRA_CRC: u8 = 231u8;
32896    const ENCODED_LEN: usize = 109usize;
32897    fn deser(
32898        _version: MavlinkVersion,
32899        __input: &[u8],
32900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32901        let avail_len = __input.len();
32902        let mut payload_buf = [0; Self::ENCODED_LEN];
32903        let mut buf = if avail_len < Self::ENCODED_LEN {
32904            payload_buf[0..avail_len].copy_from_slice(__input);
32905            Bytes::new(&payload_buf)
32906        } else {
32907            Bytes::new(__input)
32908        };
32909        let mut __struct = Self::default();
32910        __struct.time_usec = buf.get_u64_le();
32911        for v in &mut __struct.pos_x {
32912            let val = buf.get_f32_le();
32913            *v = val;
32914        }
32915        for v in &mut __struct.pos_y {
32916            let val = buf.get_f32_le();
32917            *v = val;
32918        }
32919        for v in &mut __struct.pos_z {
32920            let val = buf.get_f32_le();
32921            *v = val;
32922        }
32923        for v in &mut __struct.delta {
32924            let val = buf.get_f32_le();
32925            *v = val;
32926        }
32927        for v in &mut __struct.pos_yaw {
32928            let val = buf.get_f32_le();
32929            *v = val;
32930        }
32931        __struct.valid_points = buf.get_u8();
32932        Ok(__struct)
32933    }
32934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32935        let mut __tmp = BytesMut::new(bytes);
32936        #[allow(clippy::absurd_extreme_comparisons)]
32937        #[allow(unused_comparisons)]
32938        if __tmp.remaining() < Self::ENCODED_LEN {
32939            panic!(
32940                "buffer is too small (need {} bytes, but got {})",
32941                Self::ENCODED_LEN,
32942                __tmp.remaining(),
32943            )
32944        }
32945        __tmp.put_u64_le(self.time_usec);
32946        for val in &self.pos_x {
32947            __tmp.put_f32_le(*val);
32948        }
32949        for val in &self.pos_y {
32950            __tmp.put_f32_le(*val);
32951        }
32952        for val in &self.pos_z {
32953            __tmp.put_f32_le(*val);
32954        }
32955        for val in &self.delta {
32956            __tmp.put_f32_le(*val);
32957        }
32958        for val in &self.pos_yaw {
32959            __tmp.put_f32_le(*val);
32960        }
32961        __tmp.put_u8(self.valid_points);
32962        if matches!(version, MavlinkVersion::V2) {
32963            let len = __tmp.len();
32964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32965        } else {
32966            __tmp.len()
32967        }
32968    }
32969}
32970#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32971#[doc = ""]
32972#[doc = "ID: 332"]
32973#[derive(Debug, Clone, PartialEq)]
32974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32976#[cfg_attr(feature = "ts", derive(TS))]
32977#[cfg_attr(feature = "ts", ts(export))]
32978pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32979    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32980    pub time_usec: u64,
32981    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32983    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32984    pub pos_x: [f32; 5],
32985    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32987    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32988    pub pos_y: [f32; 5],
32989    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32991    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32992    pub pos_z: [f32; 5],
32993    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32996    pub vel_x: [f32; 5],
32997    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32999    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33000    pub vel_y: [f32; 5],
33001    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
33002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33003    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33004    pub vel_z: [f32; 5],
33005    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
33006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33008    pub acc_x: [f32; 5],
33009    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
33010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33011    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33012    pub acc_y: [f32; 5],
33013    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
33014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33016    pub acc_z: [f32; 5],
33017    #[doc = "Yaw angle, set to NaN if not being used"]
33018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33020    pub pos_yaw: [f32; 5],
33021    #[doc = "Yaw rate, set to NaN if not being used"]
33022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33024    pub vel_yaw: [f32; 5],
33025    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
33026    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33027    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33028    pub command: [u16; 5],
33029    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
33030    pub valid_points: u8,
33031}
33032impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
33033    pub const ENCODED_LEN: usize = 239usize;
33034    pub const DEFAULT: Self = Self {
33035        time_usec: 0_u64,
33036        pos_x: [0.0_f32; 5usize],
33037        pos_y: [0.0_f32; 5usize],
33038        pos_z: [0.0_f32; 5usize],
33039        vel_x: [0.0_f32; 5usize],
33040        vel_y: [0.0_f32; 5usize],
33041        vel_z: [0.0_f32; 5usize],
33042        acc_x: [0.0_f32; 5usize],
33043        acc_y: [0.0_f32; 5usize],
33044        acc_z: [0.0_f32; 5usize],
33045        pos_yaw: [0.0_f32; 5usize],
33046        vel_yaw: [0.0_f32; 5usize],
33047        command: [0_u16; 5usize],
33048        valid_points: 0_u8,
33049    };
33050    #[cfg(feature = "arbitrary")]
33051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33052        use arbitrary::{Arbitrary, Unstructured};
33053        let mut buf = [0u8; 1024];
33054        rng.fill_bytes(&mut buf);
33055        let mut unstructured = Unstructured::new(&buf);
33056        Self::arbitrary(&mut unstructured).unwrap_or_default()
33057    }
33058}
33059impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
33060    fn default() -> Self {
33061        Self::DEFAULT.clone()
33062    }
33063}
33064impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
33065    type Message = MavMessage;
33066    const ID: u32 = 332u32;
33067    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
33068    const EXTRA_CRC: u8 = 236u8;
33069    const ENCODED_LEN: usize = 239usize;
33070    fn deser(
33071        _version: MavlinkVersion,
33072        __input: &[u8],
33073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33074        let avail_len = __input.len();
33075        let mut payload_buf = [0; Self::ENCODED_LEN];
33076        let mut buf = if avail_len < Self::ENCODED_LEN {
33077            payload_buf[0..avail_len].copy_from_slice(__input);
33078            Bytes::new(&payload_buf)
33079        } else {
33080            Bytes::new(__input)
33081        };
33082        let mut __struct = Self::default();
33083        __struct.time_usec = buf.get_u64_le();
33084        for v in &mut __struct.pos_x {
33085            let val = buf.get_f32_le();
33086            *v = val;
33087        }
33088        for v in &mut __struct.pos_y {
33089            let val = buf.get_f32_le();
33090            *v = val;
33091        }
33092        for v in &mut __struct.pos_z {
33093            let val = buf.get_f32_le();
33094            *v = val;
33095        }
33096        for v in &mut __struct.vel_x {
33097            let val = buf.get_f32_le();
33098            *v = val;
33099        }
33100        for v in &mut __struct.vel_y {
33101            let val = buf.get_f32_le();
33102            *v = val;
33103        }
33104        for v in &mut __struct.vel_z {
33105            let val = buf.get_f32_le();
33106            *v = val;
33107        }
33108        for v in &mut __struct.acc_x {
33109            let val = buf.get_f32_le();
33110            *v = val;
33111        }
33112        for v in &mut __struct.acc_y {
33113            let val = buf.get_f32_le();
33114            *v = val;
33115        }
33116        for v in &mut __struct.acc_z {
33117            let val = buf.get_f32_le();
33118            *v = val;
33119        }
33120        for v in &mut __struct.pos_yaw {
33121            let val = buf.get_f32_le();
33122            *v = val;
33123        }
33124        for v in &mut __struct.vel_yaw {
33125            let val = buf.get_f32_le();
33126            *v = val;
33127        }
33128        for v in &mut __struct.command {
33129            let val = buf.get_u16_le();
33130            *v = val;
33131        }
33132        __struct.valid_points = buf.get_u8();
33133        Ok(__struct)
33134    }
33135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33136        let mut __tmp = BytesMut::new(bytes);
33137        #[allow(clippy::absurd_extreme_comparisons)]
33138        #[allow(unused_comparisons)]
33139        if __tmp.remaining() < Self::ENCODED_LEN {
33140            panic!(
33141                "buffer is too small (need {} bytes, but got {})",
33142                Self::ENCODED_LEN,
33143                __tmp.remaining(),
33144            )
33145        }
33146        __tmp.put_u64_le(self.time_usec);
33147        for val in &self.pos_x {
33148            __tmp.put_f32_le(*val);
33149        }
33150        for val in &self.pos_y {
33151            __tmp.put_f32_le(*val);
33152        }
33153        for val in &self.pos_z {
33154            __tmp.put_f32_le(*val);
33155        }
33156        for val in &self.vel_x {
33157            __tmp.put_f32_le(*val);
33158        }
33159        for val in &self.vel_y {
33160            __tmp.put_f32_le(*val);
33161        }
33162        for val in &self.vel_z {
33163            __tmp.put_f32_le(*val);
33164        }
33165        for val in &self.acc_x {
33166            __tmp.put_f32_le(*val);
33167        }
33168        for val in &self.acc_y {
33169            __tmp.put_f32_le(*val);
33170        }
33171        for val in &self.acc_z {
33172            __tmp.put_f32_le(*val);
33173        }
33174        for val in &self.pos_yaw {
33175            __tmp.put_f32_le(*val);
33176        }
33177        for val in &self.vel_yaw {
33178            __tmp.put_f32_le(*val);
33179        }
33180        for val in &self.command {
33181            __tmp.put_u16_le(*val);
33182        }
33183        __tmp.put_u8(self.valid_points);
33184        if matches!(version, MavlinkVersion::V2) {
33185            let len = __tmp.len();
33186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33187        } else {
33188            __tmp.len()
33189        }
33190    }
33191}
33192#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33193#[doc = ""]
33194#[doc = "ID: 385"]
33195#[derive(Debug, Clone, PartialEq)]
33196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33198#[cfg_attr(feature = "ts", derive(TS))]
33199#[cfg_attr(feature = "ts", ts(export))]
33200pub struct TUNNEL_DATA {
33201    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
33202    pub payload_type: MavTunnelPayloadType,
33203    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
33204    pub target_system: u8,
33205    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
33206    pub target_component: u8,
33207    #[doc = "Length of the data transported in payload"]
33208    pub payload_length: u8,
33209    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
33210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33211    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33212    pub payload: [u8; 128],
33213}
33214impl TUNNEL_DATA {
33215    pub const ENCODED_LEN: usize = 133usize;
33216    pub const DEFAULT: Self = Self {
33217        payload_type: MavTunnelPayloadType::DEFAULT,
33218        target_system: 0_u8,
33219        target_component: 0_u8,
33220        payload_length: 0_u8,
33221        payload: [0_u8; 128usize],
33222    };
33223    #[cfg(feature = "arbitrary")]
33224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33225        use arbitrary::{Arbitrary, Unstructured};
33226        let mut buf = [0u8; 1024];
33227        rng.fill_bytes(&mut buf);
33228        let mut unstructured = Unstructured::new(&buf);
33229        Self::arbitrary(&mut unstructured).unwrap_or_default()
33230    }
33231}
33232impl Default for TUNNEL_DATA {
33233    fn default() -> Self {
33234        Self::DEFAULT.clone()
33235    }
33236}
33237impl MessageData for TUNNEL_DATA {
33238    type Message = MavMessage;
33239    const ID: u32 = 385u32;
33240    const NAME: &'static str = "TUNNEL";
33241    const EXTRA_CRC: u8 = 147u8;
33242    const ENCODED_LEN: usize = 133usize;
33243    fn deser(
33244        _version: MavlinkVersion,
33245        __input: &[u8],
33246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33247        let avail_len = __input.len();
33248        let mut payload_buf = [0; Self::ENCODED_LEN];
33249        let mut buf = if avail_len < Self::ENCODED_LEN {
33250            payload_buf[0..avail_len].copy_from_slice(__input);
33251            Bytes::new(&payload_buf)
33252        } else {
33253            Bytes::new(__input)
33254        };
33255        let mut __struct = Self::default();
33256        let tmp = buf.get_u16_le();
33257        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
33258            ::mavlink_core::error::ParserError::InvalidEnum {
33259                enum_type: "MavTunnelPayloadType",
33260                value: tmp as u32,
33261            },
33262        )?;
33263        __struct.target_system = buf.get_u8();
33264        __struct.target_component = buf.get_u8();
33265        __struct.payload_length = buf.get_u8();
33266        for v in &mut __struct.payload {
33267            let val = buf.get_u8();
33268            *v = val;
33269        }
33270        Ok(__struct)
33271    }
33272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33273        let mut __tmp = BytesMut::new(bytes);
33274        #[allow(clippy::absurd_extreme_comparisons)]
33275        #[allow(unused_comparisons)]
33276        if __tmp.remaining() < Self::ENCODED_LEN {
33277            panic!(
33278                "buffer is too small (need {} bytes, but got {})",
33279                Self::ENCODED_LEN,
33280                __tmp.remaining(),
33281            )
33282        }
33283        __tmp.put_u16_le(self.payload_type as u16);
33284        __tmp.put_u8(self.target_system);
33285        __tmp.put_u8(self.target_component);
33286        __tmp.put_u8(self.payload_length);
33287        for val in &self.payload {
33288            __tmp.put_u8(*val);
33289        }
33290        if matches!(version, MavlinkVersion::V2) {
33291            let len = __tmp.len();
33292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33293        } else {
33294            __tmp.len()
33295        }
33296    }
33297}
33298#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33299#[doc = ""]
33300#[doc = "ID: 311"]
33301#[derive(Debug, Clone, PartialEq)]
33302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33304#[cfg_attr(feature = "ts", derive(TS))]
33305#[cfg_attr(feature = "ts", ts(export))]
33306pub struct UAVCAN_NODE_INFO_DATA {
33307    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33308    pub time_usec: u64,
33309    #[doc = "Time since the start-up of the node."]
33310    pub uptime_sec: u32,
33311    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
33312    pub sw_vcs_commit: u32,
33313    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
33314    #[cfg_attr(feature = "ts", ts(type = "string"))]
33315    pub name: CharArray<80>,
33316    #[doc = "Hardware major version number."]
33317    pub hw_version_major: u8,
33318    #[doc = "Hardware minor version number."]
33319    pub hw_version_minor: u8,
33320    #[doc = "Hardware unique 128-bit ID."]
33321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33322    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33323    pub hw_unique_id: [u8; 16],
33324    #[doc = "Software major version number."]
33325    pub sw_version_major: u8,
33326    #[doc = "Software minor version number."]
33327    pub sw_version_minor: u8,
33328}
33329impl UAVCAN_NODE_INFO_DATA {
33330    pub const ENCODED_LEN: usize = 116usize;
33331    pub const DEFAULT: Self = Self {
33332        time_usec: 0_u64,
33333        uptime_sec: 0_u32,
33334        sw_vcs_commit: 0_u32,
33335        name: CharArray::new([0_u8; 80usize]),
33336        hw_version_major: 0_u8,
33337        hw_version_minor: 0_u8,
33338        hw_unique_id: [0_u8; 16usize],
33339        sw_version_major: 0_u8,
33340        sw_version_minor: 0_u8,
33341    };
33342    #[cfg(feature = "arbitrary")]
33343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33344        use arbitrary::{Arbitrary, Unstructured};
33345        let mut buf = [0u8; 1024];
33346        rng.fill_bytes(&mut buf);
33347        let mut unstructured = Unstructured::new(&buf);
33348        Self::arbitrary(&mut unstructured).unwrap_or_default()
33349    }
33350}
33351impl Default for UAVCAN_NODE_INFO_DATA {
33352    fn default() -> Self {
33353        Self::DEFAULT.clone()
33354    }
33355}
33356impl MessageData for UAVCAN_NODE_INFO_DATA {
33357    type Message = MavMessage;
33358    const ID: u32 = 311u32;
33359    const NAME: &'static str = "UAVCAN_NODE_INFO";
33360    const EXTRA_CRC: u8 = 95u8;
33361    const ENCODED_LEN: usize = 116usize;
33362    fn deser(
33363        _version: MavlinkVersion,
33364        __input: &[u8],
33365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33366        let avail_len = __input.len();
33367        let mut payload_buf = [0; Self::ENCODED_LEN];
33368        let mut buf = if avail_len < Self::ENCODED_LEN {
33369            payload_buf[0..avail_len].copy_from_slice(__input);
33370            Bytes::new(&payload_buf)
33371        } else {
33372            Bytes::new(__input)
33373        };
33374        let mut __struct = Self::default();
33375        __struct.time_usec = buf.get_u64_le();
33376        __struct.uptime_sec = buf.get_u32_le();
33377        __struct.sw_vcs_commit = buf.get_u32_le();
33378        let mut tmp = [0_u8; 80usize];
33379        for v in &mut tmp {
33380            *v = buf.get_u8();
33381        }
33382        __struct.name = CharArray::new(tmp);
33383        __struct.hw_version_major = buf.get_u8();
33384        __struct.hw_version_minor = buf.get_u8();
33385        for v in &mut __struct.hw_unique_id {
33386            let val = buf.get_u8();
33387            *v = val;
33388        }
33389        __struct.sw_version_major = buf.get_u8();
33390        __struct.sw_version_minor = buf.get_u8();
33391        Ok(__struct)
33392    }
33393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33394        let mut __tmp = BytesMut::new(bytes);
33395        #[allow(clippy::absurd_extreme_comparisons)]
33396        #[allow(unused_comparisons)]
33397        if __tmp.remaining() < Self::ENCODED_LEN {
33398            panic!(
33399                "buffer is too small (need {} bytes, but got {})",
33400                Self::ENCODED_LEN,
33401                __tmp.remaining(),
33402            )
33403        }
33404        __tmp.put_u64_le(self.time_usec);
33405        __tmp.put_u32_le(self.uptime_sec);
33406        __tmp.put_u32_le(self.sw_vcs_commit);
33407        for val in &self.name {
33408            __tmp.put_u8(*val);
33409        }
33410        __tmp.put_u8(self.hw_version_major);
33411        __tmp.put_u8(self.hw_version_minor);
33412        for val in &self.hw_unique_id {
33413            __tmp.put_u8(*val);
33414        }
33415        __tmp.put_u8(self.sw_version_major);
33416        __tmp.put_u8(self.sw_version_minor);
33417        if matches!(version, MavlinkVersion::V2) {
33418            let len = __tmp.len();
33419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33420        } else {
33421            __tmp.len()
33422        }
33423    }
33424}
33425#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33426#[doc = ""]
33427#[doc = "ID: 310"]
33428#[derive(Debug, Clone, PartialEq)]
33429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33431#[cfg_attr(feature = "ts", derive(TS))]
33432#[cfg_attr(feature = "ts", ts(export))]
33433pub struct UAVCAN_NODE_STATUS_DATA {
33434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33435    pub time_usec: u64,
33436    #[doc = "Time since the start-up of the node."]
33437    pub uptime_sec: u32,
33438    #[doc = "Vendor-specific status information."]
33439    pub vendor_specific_status_code: u16,
33440    #[doc = "Generalized node health status."]
33441    pub health: UavcanNodeHealth,
33442    #[doc = "Generalized operating mode."]
33443    pub mode: UavcanNodeMode,
33444    #[doc = "Not used currently."]
33445    pub sub_mode: u8,
33446}
33447impl UAVCAN_NODE_STATUS_DATA {
33448    pub const ENCODED_LEN: usize = 17usize;
33449    pub const DEFAULT: Self = Self {
33450        time_usec: 0_u64,
33451        uptime_sec: 0_u32,
33452        vendor_specific_status_code: 0_u16,
33453        health: UavcanNodeHealth::DEFAULT,
33454        mode: UavcanNodeMode::DEFAULT,
33455        sub_mode: 0_u8,
33456    };
33457    #[cfg(feature = "arbitrary")]
33458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33459        use arbitrary::{Arbitrary, Unstructured};
33460        let mut buf = [0u8; 1024];
33461        rng.fill_bytes(&mut buf);
33462        let mut unstructured = Unstructured::new(&buf);
33463        Self::arbitrary(&mut unstructured).unwrap_or_default()
33464    }
33465}
33466impl Default for UAVCAN_NODE_STATUS_DATA {
33467    fn default() -> Self {
33468        Self::DEFAULT.clone()
33469    }
33470}
33471impl MessageData for UAVCAN_NODE_STATUS_DATA {
33472    type Message = MavMessage;
33473    const ID: u32 = 310u32;
33474    const NAME: &'static str = "UAVCAN_NODE_STATUS";
33475    const EXTRA_CRC: u8 = 28u8;
33476    const ENCODED_LEN: usize = 17usize;
33477    fn deser(
33478        _version: MavlinkVersion,
33479        __input: &[u8],
33480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33481        let avail_len = __input.len();
33482        let mut payload_buf = [0; Self::ENCODED_LEN];
33483        let mut buf = if avail_len < Self::ENCODED_LEN {
33484            payload_buf[0..avail_len].copy_from_slice(__input);
33485            Bytes::new(&payload_buf)
33486        } else {
33487            Bytes::new(__input)
33488        };
33489        let mut __struct = Self::default();
33490        __struct.time_usec = buf.get_u64_le();
33491        __struct.uptime_sec = buf.get_u32_le();
33492        __struct.vendor_specific_status_code = buf.get_u16_le();
33493        let tmp = buf.get_u8();
33494        __struct.health =
33495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33496                enum_type: "UavcanNodeHealth",
33497                value: tmp as u32,
33498            })?;
33499        let tmp = buf.get_u8();
33500        __struct.mode =
33501            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33502                enum_type: "UavcanNodeMode",
33503                value: tmp as u32,
33504            })?;
33505        __struct.sub_mode = buf.get_u8();
33506        Ok(__struct)
33507    }
33508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33509        let mut __tmp = BytesMut::new(bytes);
33510        #[allow(clippy::absurd_extreme_comparisons)]
33511        #[allow(unused_comparisons)]
33512        if __tmp.remaining() < Self::ENCODED_LEN {
33513            panic!(
33514                "buffer is too small (need {} bytes, but got {})",
33515                Self::ENCODED_LEN,
33516                __tmp.remaining(),
33517            )
33518        }
33519        __tmp.put_u64_le(self.time_usec);
33520        __tmp.put_u32_le(self.uptime_sec);
33521        __tmp.put_u16_le(self.vendor_specific_status_code);
33522        __tmp.put_u8(self.health as u8);
33523        __tmp.put_u8(self.mode as u8);
33524        __tmp.put_u8(self.sub_mode);
33525        if matches!(version, MavlinkVersion::V2) {
33526            let len = __tmp.len();
33527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33528        } else {
33529            __tmp.len()
33530        }
33531    }
33532}
33533#[doc = "The global position resulting from GPS and sensor fusion."]
33534#[doc = ""]
33535#[doc = "ID: 340"]
33536#[derive(Debug, Clone, PartialEq)]
33537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33539#[cfg_attr(feature = "ts", derive(TS))]
33540#[cfg_attr(feature = "ts", ts(export))]
33541pub struct UTM_GLOBAL_POSITION_DATA {
33542    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
33543    pub time: u64,
33544    #[doc = "Latitude (WGS84)"]
33545    pub lat: i32,
33546    #[doc = "Longitude (WGS84)"]
33547    pub lon: i32,
33548    #[doc = "Altitude (WGS84)"]
33549    pub alt: i32,
33550    #[doc = "Altitude above ground"]
33551    pub relative_alt: i32,
33552    #[doc = "Next waypoint, latitude (WGS84)"]
33553    pub next_lat: i32,
33554    #[doc = "Next waypoint, longitude (WGS84)"]
33555    pub next_lon: i32,
33556    #[doc = "Next waypoint, altitude (WGS84)"]
33557    pub next_alt: i32,
33558    #[doc = "Ground X speed (latitude, positive north)"]
33559    pub vx: i16,
33560    #[doc = "Ground Y speed (longitude, positive east)"]
33561    pub vy: i16,
33562    #[doc = "Ground Z speed (altitude, positive down)"]
33563    pub vz: i16,
33564    #[doc = "Horizontal position uncertainty (standard deviation)"]
33565    pub h_acc: u16,
33566    #[doc = "Altitude uncertainty (standard deviation)"]
33567    pub v_acc: u16,
33568    #[doc = "Speed uncertainty (standard deviation)"]
33569    pub vel_acc: u16,
33570    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
33571    pub update_rate: u16,
33572    #[doc = "Unique UAS ID."]
33573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33574    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33575    pub uas_id: [u8; 18],
33576    #[doc = "Flight state"]
33577    pub flight_state: UtmFlightState,
33578    #[doc = "Bitwise OR combination of the data available flags."]
33579    pub flags: UtmDataAvailFlags,
33580}
33581impl UTM_GLOBAL_POSITION_DATA {
33582    pub const ENCODED_LEN: usize = 70usize;
33583    pub const DEFAULT: Self = Self {
33584        time: 0_u64,
33585        lat: 0_i32,
33586        lon: 0_i32,
33587        alt: 0_i32,
33588        relative_alt: 0_i32,
33589        next_lat: 0_i32,
33590        next_lon: 0_i32,
33591        next_alt: 0_i32,
33592        vx: 0_i16,
33593        vy: 0_i16,
33594        vz: 0_i16,
33595        h_acc: 0_u16,
33596        v_acc: 0_u16,
33597        vel_acc: 0_u16,
33598        update_rate: 0_u16,
33599        uas_id: [0_u8; 18usize],
33600        flight_state: UtmFlightState::DEFAULT,
33601        flags: UtmDataAvailFlags::DEFAULT,
33602    };
33603    #[cfg(feature = "arbitrary")]
33604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33605        use arbitrary::{Arbitrary, Unstructured};
33606        let mut buf = [0u8; 1024];
33607        rng.fill_bytes(&mut buf);
33608        let mut unstructured = Unstructured::new(&buf);
33609        Self::arbitrary(&mut unstructured).unwrap_or_default()
33610    }
33611}
33612impl Default for UTM_GLOBAL_POSITION_DATA {
33613    fn default() -> Self {
33614        Self::DEFAULT.clone()
33615    }
33616}
33617impl MessageData for UTM_GLOBAL_POSITION_DATA {
33618    type Message = MavMessage;
33619    const ID: u32 = 340u32;
33620    const NAME: &'static str = "UTM_GLOBAL_POSITION";
33621    const EXTRA_CRC: u8 = 99u8;
33622    const ENCODED_LEN: usize = 70usize;
33623    fn deser(
33624        _version: MavlinkVersion,
33625        __input: &[u8],
33626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33627        let avail_len = __input.len();
33628        let mut payload_buf = [0; Self::ENCODED_LEN];
33629        let mut buf = if avail_len < Self::ENCODED_LEN {
33630            payload_buf[0..avail_len].copy_from_slice(__input);
33631            Bytes::new(&payload_buf)
33632        } else {
33633            Bytes::new(__input)
33634        };
33635        let mut __struct = Self::default();
33636        __struct.time = buf.get_u64_le();
33637        __struct.lat = buf.get_i32_le();
33638        __struct.lon = buf.get_i32_le();
33639        __struct.alt = buf.get_i32_le();
33640        __struct.relative_alt = buf.get_i32_le();
33641        __struct.next_lat = buf.get_i32_le();
33642        __struct.next_lon = buf.get_i32_le();
33643        __struct.next_alt = buf.get_i32_le();
33644        __struct.vx = buf.get_i16_le();
33645        __struct.vy = buf.get_i16_le();
33646        __struct.vz = buf.get_i16_le();
33647        __struct.h_acc = buf.get_u16_le();
33648        __struct.v_acc = buf.get_u16_le();
33649        __struct.vel_acc = buf.get_u16_le();
33650        __struct.update_rate = buf.get_u16_le();
33651        for v in &mut __struct.uas_id {
33652            let val = buf.get_u8();
33653            *v = val;
33654        }
33655        let tmp = buf.get_u8();
33656        __struct.flight_state =
33657            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33658                enum_type: "UtmFlightState",
33659                value: tmp as u32,
33660            })?;
33661        let tmp = buf.get_u8();
33662        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
33663            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33664                flag_type: "UtmDataAvailFlags",
33665                value: tmp as u32,
33666            })?;
33667        Ok(__struct)
33668    }
33669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33670        let mut __tmp = BytesMut::new(bytes);
33671        #[allow(clippy::absurd_extreme_comparisons)]
33672        #[allow(unused_comparisons)]
33673        if __tmp.remaining() < Self::ENCODED_LEN {
33674            panic!(
33675                "buffer is too small (need {} bytes, but got {})",
33676                Self::ENCODED_LEN,
33677                __tmp.remaining(),
33678            )
33679        }
33680        __tmp.put_u64_le(self.time);
33681        __tmp.put_i32_le(self.lat);
33682        __tmp.put_i32_le(self.lon);
33683        __tmp.put_i32_le(self.alt);
33684        __tmp.put_i32_le(self.relative_alt);
33685        __tmp.put_i32_le(self.next_lat);
33686        __tmp.put_i32_le(self.next_lon);
33687        __tmp.put_i32_le(self.next_alt);
33688        __tmp.put_i16_le(self.vx);
33689        __tmp.put_i16_le(self.vy);
33690        __tmp.put_i16_le(self.vz);
33691        __tmp.put_u16_le(self.h_acc);
33692        __tmp.put_u16_le(self.v_acc);
33693        __tmp.put_u16_le(self.vel_acc);
33694        __tmp.put_u16_le(self.update_rate);
33695        for val in &self.uas_id {
33696            __tmp.put_u8(*val);
33697        }
33698        __tmp.put_u8(self.flight_state as u8);
33699        __tmp.put_u8(self.flags.bits());
33700        if matches!(version, MavlinkVersion::V2) {
33701            let len = __tmp.len();
33702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33703        } else {
33704            __tmp.len()
33705        }
33706    }
33707}
33708#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33709#[doc = ""]
33710#[doc = "ID: 248"]
33711#[derive(Debug, Clone, PartialEq)]
33712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33714#[cfg_attr(feature = "ts", derive(TS))]
33715#[cfg_attr(feature = "ts", ts(export))]
33716pub struct V2_EXTENSION_DATA {
33717    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
33718    pub message_type: u16,
33719    #[doc = "Network ID (0 for broadcast)"]
33720    pub target_network: u8,
33721    #[doc = "System ID (0 for broadcast)"]
33722    pub target_system: u8,
33723    #[doc = "Component ID (0 for broadcast)"]
33724    pub target_component: u8,
33725    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
33726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33727    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33728    pub payload: [u8; 249],
33729}
33730impl V2_EXTENSION_DATA {
33731    pub const ENCODED_LEN: usize = 254usize;
33732    pub const DEFAULT: Self = Self {
33733        message_type: 0_u16,
33734        target_network: 0_u8,
33735        target_system: 0_u8,
33736        target_component: 0_u8,
33737        payload: [0_u8; 249usize],
33738    };
33739    #[cfg(feature = "arbitrary")]
33740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33741        use arbitrary::{Arbitrary, Unstructured};
33742        let mut buf = [0u8; 1024];
33743        rng.fill_bytes(&mut buf);
33744        let mut unstructured = Unstructured::new(&buf);
33745        Self::arbitrary(&mut unstructured).unwrap_or_default()
33746    }
33747}
33748impl Default for V2_EXTENSION_DATA {
33749    fn default() -> Self {
33750        Self::DEFAULT.clone()
33751    }
33752}
33753impl MessageData for V2_EXTENSION_DATA {
33754    type Message = MavMessage;
33755    const ID: u32 = 248u32;
33756    const NAME: &'static str = "V2_EXTENSION";
33757    const EXTRA_CRC: u8 = 8u8;
33758    const ENCODED_LEN: usize = 254usize;
33759    fn deser(
33760        _version: MavlinkVersion,
33761        __input: &[u8],
33762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33763        let avail_len = __input.len();
33764        let mut payload_buf = [0; Self::ENCODED_LEN];
33765        let mut buf = if avail_len < Self::ENCODED_LEN {
33766            payload_buf[0..avail_len].copy_from_slice(__input);
33767            Bytes::new(&payload_buf)
33768        } else {
33769            Bytes::new(__input)
33770        };
33771        let mut __struct = Self::default();
33772        __struct.message_type = buf.get_u16_le();
33773        __struct.target_network = buf.get_u8();
33774        __struct.target_system = buf.get_u8();
33775        __struct.target_component = buf.get_u8();
33776        for v in &mut __struct.payload {
33777            let val = buf.get_u8();
33778            *v = val;
33779        }
33780        Ok(__struct)
33781    }
33782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33783        let mut __tmp = BytesMut::new(bytes);
33784        #[allow(clippy::absurd_extreme_comparisons)]
33785        #[allow(unused_comparisons)]
33786        if __tmp.remaining() < Self::ENCODED_LEN {
33787            panic!(
33788                "buffer is too small (need {} bytes, but got {})",
33789                Self::ENCODED_LEN,
33790                __tmp.remaining(),
33791            )
33792        }
33793        __tmp.put_u16_le(self.message_type);
33794        __tmp.put_u8(self.target_network);
33795        __tmp.put_u8(self.target_system);
33796        __tmp.put_u8(self.target_component);
33797        for val in &self.payload {
33798            __tmp.put_u8(*val);
33799        }
33800        if matches!(version, MavlinkVersion::V2) {
33801            let len = __tmp.len();
33802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33803        } else {
33804            __tmp.len()
33805        }
33806    }
33807}
33808#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33809#[doc = ""]
33810#[doc = "ID: 74"]
33811#[derive(Debug, Clone, PartialEq)]
33812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33814#[cfg_attr(feature = "ts", derive(TS))]
33815#[cfg_attr(feature = "ts", ts(export))]
33816pub struct VFR_HUD_DATA {
33817    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
33818    pub airspeed: f32,
33819    #[doc = "Current ground speed."]
33820    pub groundspeed: f32,
33821    #[doc = "Current altitude (MSL)."]
33822    pub alt: f32,
33823    #[doc = "Current climb rate."]
33824    pub climb: f32,
33825    #[doc = "Current heading in compass units (0-360, 0=north)."]
33826    pub heading: i16,
33827    #[doc = "Current throttle setting (0 to 100)."]
33828    pub throttle: u16,
33829}
33830impl VFR_HUD_DATA {
33831    pub const ENCODED_LEN: usize = 20usize;
33832    pub const DEFAULT: Self = Self {
33833        airspeed: 0.0_f32,
33834        groundspeed: 0.0_f32,
33835        alt: 0.0_f32,
33836        climb: 0.0_f32,
33837        heading: 0_i16,
33838        throttle: 0_u16,
33839    };
33840    #[cfg(feature = "arbitrary")]
33841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33842        use arbitrary::{Arbitrary, Unstructured};
33843        let mut buf = [0u8; 1024];
33844        rng.fill_bytes(&mut buf);
33845        let mut unstructured = Unstructured::new(&buf);
33846        Self::arbitrary(&mut unstructured).unwrap_or_default()
33847    }
33848}
33849impl Default for VFR_HUD_DATA {
33850    fn default() -> Self {
33851        Self::DEFAULT.clone()
33852    }
33853}
33854impl MessageData for VFR_HUD_DATA {
33855    type Message = MavMessage;
33856    const ID: u32 = 74u32;
33857    const NAME: &'static str = "VFR_HUD";
33858    const EXTRA_CRC: u8 = 20u8;
33859    const ENCODED_LEN: usize = 20usize;
33860    fn deser(
33861        _version: MavlinkVersion,
33862        __input: &[u8],
33863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33864        let avail_len = __input.len();
33865        let mut payload_buf = [0; Self::ENCODED_LEN];
33866        let mut buf = if avail_len < Self::ENCODED_LEN {
33867            payload_buf[0..avail_len].copy_from_slice(__input);
33868            Bytes::new(&payload_buf)
33869        } else {
33870            Bytes::new(__input)
33871        };
33872        let mut __struct = Self::default();
33873        __struct.airspeed = buf.get_f32_le();
33874        __struct.groundspeed = buf.get_f32_le();
33875        __struct.alt = buf.get_f32_le();
33876        __struct.climb = buf.get_f32_le();
33877        __struct.heading = buf.get_i16_le();
33878        __struct.throttle = buf.get_u16_le();
33879        Ok(__struct)
33880    }
33881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33882        let mut __tmp = BytesMut::new(bytes);
33883        #[allow(clippy::absurd_extreme_comparisons)]
33884        #[allow(unused_comparisons)]
33885        if __tmp.remaining() < Self::ENCODED_LEN {
33886            panic!(
33887                "buffer is too small (need {} bytes, but got {})",
33888                Self::ENCODED_LEN,
33889                __tmp.remaining(),
33890            )
33891        }
33892        __tmp.put_f32_le(self.airspeed);
33893        __tmp.put_f32_le(self.groundspeed);
33894        __tmp.put_f32_le(self.alt);
33895        __tmp.put_f32_le(self.climb);
33896        __tmp.put_i16_le(self.heading);
33897        __tmp.put_u16_le(self.throttle);
33898        if matches!(version, MavlinkVersion::V2) {
33899            let len = __tmp.len();
33900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33901        } else {
33902            __tmp.len()
33903        }
33904    }
33905}
33906#[doc = "Vibration levels and accelerometer clipping."]
33907#[doc = ""]
33908#[doc = "ID: 241"]
33909#[derive(Debug, Clone, PartialEq)]
33910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33912#[cfg_attr(feature = "ts", derive(TS))]
33913#[cfg_attr(feature = "ts", ts(export))]
33914pub struct VIBRATION_DATA {
33915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33916    pub time_usec: u64,
33917    #[doc = "Vibration levels on X-axis"]
33918    pub vibration_x: f32,
33919    #[doc = "Vibration levels on Y-axis"]
33920    pub vibration_y: f32,
33921    #[doc = "Vibration levels on Z-axis"]
33922    pub vibration_z: f32,
33923    #[doc = "first accelerometer clipping count"]
33924    pub clipping_0: u32,
33925    #[doc = "second accelerometer clipping count"]
33926    pub clipping_1: u32,
33927    #[doc = "third accelerometer clipping count"]
33928    pub clipping_2: u32,
33929}
33930impl VIBRATION_DATA {
33931    pub const ENCODED_LEN: usize = 32usize;
33932    pub const DEFAULT: Self = Self {
33933        time_usec: 0_u64,
33934        vibration_x: 0.0_f32,
33935        vibration_y: 0.0_f32,
33936        vibration_z: 0.0_f32,
33937        clipping_0: 0_u32,
33938        clipping_1: 0_u32,
33939        clipping_2: 0_u32,
33940    };
33941    #[cfg(feature = "arbitrary")]
33942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33943        use arbitrary::{Arbitrary, Unstructured};
33944        let mut buf = [0u8; 1024];
33945        rng.fill_bytes(&mut buf);
33946        let mut unstructured = Unstructured::new(&buf);
33947        Self::arbitrary(&mut unstructured).unwrap_or_default()
33948    }
33949}
33950impl Default for VIBRATION_DATA {
33951    fn default() -> Self {
33952        Self::DEFAULT.clone()
33953    }
33954}
33955impl MessageData for VIBRATION_DATA {
33956    type Message = MavMessage;
33957    const ID: u32 = 241u32;
33958    const NAME: &'static str = "VIBRATION";
33959    const EXTRA_CRC: u8 = 90u8;
33960    const ENCODED_LEN: usize = 32usize;
33961    fn deser(
33962        _version: MavlinkVersion,
33963        __input: &[u8],
33964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33965        let avail_len = __input.len();
33966        let mut payload_buf = [0; Self::ENCODED_LEN];
33967        let mut buf = if avail_len < Self::ENCODED_LEN {
33968            payload_buf[0..avail_len].copy_from_slice(__input);
33969            Bytes::new(&payload_buf)
33970        } else {
33971            Bytes::new(__input)
33972        };
33973        let mut __struct = Self::default();
33974        __struct.time_usec = buf.get_u64_le();
33975        __struct.vibration_x = buf.get_f32_le();
33976        __struct.vibration_y = buf.get_f32_le();
33977        __struct.vibration_z = buf.get_f32_le();
33978        __struct.clipping_0 = buf.get_u32_le();
33979        __struct.clipping_1 = buf.get_u32_le();
33980        __struct.clipping_2 = buf.get_u32_le();
33981        Ok(__struct)
33982    }
33983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33984        let mut __tmp = BytesMut::new(bytes);
33985        #[allow(clippy::absurd_extreme_comparisons)]
33986        #[allow(unused_comparisons)]
33987        if __tmp.remaining() < Self::ENCODED_LEN {
33988            panic!(
33989                "buffer is too small (need {} bytes, but got {})",
33990                Self::ENCODED_LEN,
33991                __tmp.remaining(),
33992            )
33993        }
33994        __tmp.put_u64_le(self.time_usec);
33995        __tmp.put_f32_le(self.vibration_x);
33996        __tmp.put_f32_le(self.vibration_y);
33997        __tmp.put_f32_le(self.vibration_z);
33998        __tmp.put_u32_le(self.clipping_0);
33999        __tmp.put_u32_le(self.clipping_1);
34000        __tmp.put_u32_le(self.clipping_2);
34001        if matches!(version, MavlinkVersion::V2) {
34002            let len = __tmp.len();
34003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34004        } else {
34005            __tmp.len()
34006        }
34007    }
34008}
34009#[doc = "Global position estimate from a Vicon motion system source."]
34010#[doc = ""]
34011#[doc = "ID: 104"]
34012#[derive(Debug, Clone, PartialEq)]
34013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34015#[cfg_attr(feature = "ts", derive(TS))]
34016#[cfg_attr(feature = "ts", ts(export))]
34017pub struct VICON_POSITION_ESTIMATE_DATA {
34018    #[doc = "Timestamp (UNIX time or time since system boot)"]
34019    pub usec: u64,
34020    #[doc = "Global X position"]
34021    pub x: f32,
34022    #[doc = "Global Y position"]
34023    pub y: f32,
34024    #[doc = "Global Z position"]
34025    pub z: f32,
34026    #[doc = "Roll angle"]
34027    pub roll: f32,
34028    #[doc = "Pitch angle"]
34029    pub pitch: f32,
34030    #[doc = "Yaw angle"]
34031    pub yaw: f32,
34032    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
34033    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34034    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34035    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34036    pub covariance: [f32; 21],
34037}
34038impl VICON_POSITION_ESTIMATE_DATA {
34039    pub const ENCODED_LEN: usize = 116usize;
34040    pub const DEFAULT: Self = Self {
34041        usec: 0_u64,
34042        x: 0.0_f32,
34043        y: 0.0_f32,
34044        z: 0.0_f32,
34045        roll: 0.0_f32,
34046        pitch: 0.0_f32,
34047        yaw: 0.0_f32,
34048        covariance: [0.0_f32; 21usize],
34049    };
34050    #[cfg(feature = "arbitrary")]
34051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34052        use arbitrary::{Arbitrary, Unstructured};
34053        let mut buf = [0u8; 1024];
34054        rng.fill_bytes(&mut buf);
34055        let mut unstructured = Unstructured::new(&buf);
34056        Self::arbitrary(&mut unstructured).unwrap_or_default()
34057    }
34058}
34059impl Default for VICON_POSITION_ESTIMATE_DATA {
34060    fn default() -> Self {
34061        Self::DEFAULT.clone()
34062    }
34063}
34064impl MessageData for VICON_POSITION_ESTIMATE_DATA {
34065    type Message = MavMessage;
34066    const ID: u32 = 104u32;
34067    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
34068    const EXTRA_CRC: u8 = 56u8;
34069    const ENCODED_LEN: usize = 116usize;
34070    fn deser(
34071        _version: MavlinkVersion,
34072        __input: &[u8],
34073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34074        let avail_len = __input.len();
34075        let mut payload_buf = [0; Self::ENCODED_LEN];
34076        let mut buf = if avail_len < Self::ENCODED_LEN {
34077            payload_buf[0..avail_len].copy_from_slice(__input);
34078            Bytes::new(&payload_buf)
34079        } else {
34080            Bytes::new(__input)
34081        };
34082        let mut __struct = Self::default();
34083        __struct.usec = buf.get_u64_le();
34084        __struct.x = buf.get_f32_le();
34085        __struct.y = buf.get_f32_le();
34086        __struct.z = buf.get_f32_le();
34087        __struct.roll = buf.get_f32_le();
34088        __struct.pitch = buf.get_f32_le();
34089        __struct.yaw = buf.get_f32_le();
34090        for v in &mut __struct.covariance {
34091            let val = buf.get_f32_le();
34092            *v = val;
34093        }
34094        Ok(__struct)
34095    }
34096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34097        let mut __tmp = BytesMut::new(bytes);
34098        #[allow(clippy::absurd_extreme_comparisons)]
34099        #[allow(unused_comparisons)]
34100        if __tmp.remaining() < Self::ENCODED_LEN {
34101            panic!(
34102                "buffer is too small (need {} bytes, but got {})",
34103                Self::ENCODED_LEN,
34104                __tmp.remaining(),
34105            )
34106        }
34107        __tmp.put_u64_le(self.usec);
34108        __tmp.put_f32_le(self.x);
34109        __tmp.put_f32_le(self.y);
34110        __tmp.put_f32_le(self.z);
34111        __tmp.put_f32_le(self.roll);
34112        __tmp.put_f32_le(self.pitch);
34113        __tmp.put_f32_le(self.yaw);
34114        if matches!(version, MavlinkVersion::V2) {
34115            for val in &self.covariance {
34116                __tmp.put_f32_le(*val);
34117            }
34118            let len = __tmp.len();
34119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34120        } else {
34121            __tmp.len()
34122        }
34123    }
34124}
34125#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34126#[doc = ""]
34127#[doc = "ID: 269"]
34128#[derive(Debug, Clone, PartialEq)]
34129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34131#[cfg_attr(feature = "ts", derive(TS))]
34132#[cfg_attr(feature = "ts", ts(export))]
34133pub struct VIDEO_STREAM_INFORMATION_DATA {
34134    #[doc = "Frame rate."]
34135    pub framerate: f32,
34136    #[doc = "Bit rate."]
34137    pub bitrate: u32,
34138    #[doc = "Bitmap of stream status flags."]
34139    pub flags: VideoStreamStatusFlags,
34140    #[doc = "Horizontal resolution."]
34141    pub resolution_h: u16,
34142    #[doc = "Vertical resolution."]
34143    pub resolution_v: u16,
34144    #[doc = "Video image rotation clockwise."]
34145    pub rotation: u16,
34146    #[doc = "Horizontal Field of view."]
34147    pub hfov: u16,
34148    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
34149    pub stream_id: u8,
34150    #[doc = "Number of streams available."]
34151    pub count: u8,
34152    #[doc = "Type of stream."]
34153    pub mavtype: VideoStreamType,
34154    #[doc = "Stream name."]
34155    #[cfg_attr(feature = "ts", ts(type = "string"))]
34156    pub name: CharArray<32>,
34157    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
34158    #[cfg_attr(feature = "ts", ts(type = "string"))]
34159    pub uri: CharArray<160>,
34160    #[doc = "Encoding of stream."]
34161    #[cfg_attr(feature = "serde", serde(default))]
34162    pub encoding: VideoStreamEncoding,
34163    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
34164    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34165    pub camera_device_id: u8,
34166}
34167impl VIDEO_STREAM_INFORMATION_DATA {
34168    pub const ENCODED_LEN: usize = 215usize;
34169    pub const DEFAULT: Self = Self {
34170        framerate: 0.0_f32,
34171        bitrate: 0_u32,
34172        flags: VideoStreamStatusFlags::DEFAULT,
34173        resolution_h: 0_u16,
34174        resolution_v: 0_u16,
34175        rotation: 0_u16,
34176        hfov: 0_u16,
34177        stream_id: 0_u8,
34178        count: 0_u8,
34179        mavtype: VideoStreamType::DEFAULT,
34180        name: CharArray::new([0_u8; 32usize]),
34181        uri: CharArray::new([0_u8; 160usize]),
34182        encoding: VideoStreamEncoding::DEFAULT,
34183        camera_device_id: 0_u8,
34184    };
34185    #[cfg(feature = "arbitrary")]
34186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34187        use arbitrary::{Arbitrary, Unstructured};
34188        let mut buf = [0u8; 1024];
34189        rng.fill_bytes(&mut buf);
34190        let mut unstructured = Unstructured::new(&buf);
34191        Self::arbitrary(&mut unstructured).unwrap_or_default()
34192    }
34193}
34194impl Default for VIDEO_STREAM_INFORMATION_DATA {
34195    fn default() -> Self {
34196        Self::DEFAULT.clone()
34197    }
34198}
34199impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
34200    type Message = MavMessage;
34201    const ID: u32 = 269u32;
34202    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
34203    const EXTRA_CRC: u8 = 109u8;
34204    const ENCODED_LEN: usize = 215usize;
34205    fn deser(
34206        _version: MavlinkVersion,
34207        __input: &[u8],
34208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34209        let avail_len = __input.len();
34210        let mut payload_buf = [0; Self::ENCODED_LEN];
34211        let mut buf = if avail_len < Self::ENCODED_LEN {
34212            payload_buf[0..avail_len].copy_from_slice(__input);
34213            Bytes::new(&payload_buf)
34214        } else {
34215            Bytes::new(__input)
34216        };
34217        let mut __struct = Self::default();
34218        __struct.framerate = buf.get_f32_le();
34219        __struct.bitrate = buf.get_u32_le();
34220        let tmp = buf.get_u16_le();
34221        __struct.flags = VideoStreamStatusFlags::from_bits(
34222            tmp & VideoStreamStatusFlags::all().bits(),
34223        )
34224        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34225            flag_type: "VideoStreamStatusFlags",
34226            value: tmp as u32,
34227        })?;
34228        __struct.resolution_h = buf.get_u16_le();
34229        __struct.resolution_v = buf.get_u16_le();
34230        __struct.rotation = buf.get_u16_le();
34231        __struct.hfov = buf.get_u16_le();
34232        __struct.stream_id = buf.get_u8();
34233        __struct.count = buf.get_u8();
34234        let tmp = buf.get_u8();
34235        __struct.mavtype =
34236            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34237                enum_type: "VideoStreamType",
34238                value: tmp as u32,
34239            })?;
34240        let mut tmp = [0_u8; 32usize];
34241        for v in &mut tmp {
34242            *v = buf.get_u8();
34243        }
34244        __struct.name = CharArray::new(tmp);
34245        let mut tmp = [0_u8; 160usize];
34246        for v in &mut tmp {
34247            *v = buf.get_u8();
34248        }
34249        __struct.uri = CharArray::new(tmp);
34250        let tmp = buf.get_u8();
34251        __struct.encoding =
34252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34253                enum_type: "VideoStreamEncoding",
34254                value: tmp as u32,
34255            })?;
34256        __struct.camera_device_id = buf.get_u8();
34257        Ok(__struct)
34258    }
34259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34260        let mut __tmp = BytesMut::new(bytes);
34261        #[allow(clippy::absurd_extreme_comparisons)]
34262        #[allow(unused_comparisons)]
34263        if __tmp.remaining() < Self::ENCODED_LEN {
34264            panic!(
34265                "buffer is too small (need {} bytes, but got {})",
34266                Self::ENCODED_LEN,
34267                __tmp.remaining(),
34268            )
34269        }
34270        __tmp.put_f32_le(self.framerate);
34271        __tmp.put_u32_le(self.bitrate);
34272        __tmp.put_u16_le(self.flags.bits());
34273        __tmp.put_u16_le(self.resolution_h);
34274        __tmp.put_u16_le(self.resolution_v);
34275        __tmp.put_u16_le(self.rotation);
34276        __tmp.put_u16_le(self.hfov);
34277        __tmp.put_u8(self.stream_id);
34278        __tmp.put_u8(self.count);
34279        __tmp.put_u8(self.mavtype as u8);
34280        for val in &self.name {
34281            __tmp.put_u8(*val);
34282        }
34283        for val in &self.uri {
34284            __tmp.put_u8(*val);
34285        }
34286        if matches!(version, MavlinkVersion::V2) {
34287            __tmp.put_u8(self.encoding as u8);
34288            __tmp.put_u8(self.camera_device_id);
34289            let len = __tmp.len();
34290            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34291        } else {
34292            __tmp.len()
34293        }
34294    }
34295}
34296#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34297#[doc = ""]
34298#[doc = "ID: 270"]
34299#[derive(Debug, Clone, PartialEq)]
34300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34302#[cfg_attr(feature = "ts", derive(TS))]
34303#[cfg_attr(feature = "ts", ts(export))]
34304pub struct VIDEO_STREAM_STATUS_DATA {
34305    #[doc = "Frame rate"]
34306    pub framerate: f32,
34307    #[doc = "Bit rate"]
34308    pub bitrate: u32,
34309    #[doc = "Bitmap of stream status flags"]
34310    pub flags: VideoStreamStatusFlags,
34311    #[doc = "Horizontal resolution"]
34312    pub resolution_h: u16,
34313    #[doc = "Vertical resolution"]
34314    pub resolution_v: u16,
34315    #[doc = "Video image rotation clockwise"]
34316    pub rotation: u16,
34317    #[doc = "Horizontal Field of view"]
34318    pub hfov: u16,
34319    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
34320    pub stream_id: u8,
34321    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
34322    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34323    pub camera_device_id: u8,
34324}
34325impl VIDEO_STREAM_STATUS_DATA {
34326    pub const ENCODED_LEN: usize = 20usize;
34327    pub const DEFAULT: Self = Self {
34328        framerate: 0.0_f32,
34329        bitrate: 0_u32,
34330        flags: VideoStreamStatusFlags::DEFAULT,
34331        resolution_h: 0_u16,
34332        resolution_v: 0_u16,
34333        rotation: 0_u16,
34334        hfov: 0_u16,
34335        stream_id: 0_u8,
34336        camera_device_id: 0_u8,
34337    };
34338    #[cfg(feature = "arbitrary")]
34339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34340        use arbitrary::{Arbitrary, Unstructured};
34341        let mut buf = [0u8; 1024];
34342        rng.fill_bytes(&mut buf);
34343        let mut unstructured = Unstructured::new(&buf);
34344        Self::arbitrary(&mut unstructured).unwrap_or_default()
34345    }
34346}
34347impl Default for VIDEO_STREAM_STATUS_DATA {
34348    fn default() -> Self {
34349        Self::DEFAULT.clone()
34350    }
34351}
34352impl MessageData for VIDEO_STREAM_STATUS_DATA {
34353    type Message = MavMessage;
34354    const ID: u32 = 270u32;
34355    const NAME: &'static str = "VIDEO_STREAM_STATUS";
34356    const EXTRA_CRC: u8 = 59u8;
34357    const ENCODED_LEN: usize = 20usize;
34358    fn deser(
34359        _version: MavlinkVersion,
34360        __input: &[u8],
34361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34362        let avail_len = __input.len();
34363        let mut payload_buf = [0; Self::ENCODED_LEN];
34364        let mut buf = if avail_len < Self::ENCODED_LEN {
34365            payload_buf[0..avail_len].copy_from_slice(__input);
34366            Bytes::new(&payload_buf)
34367        } else {
34368            Bytes::new(__input)
34369        };
34370        let mut __struct = Self::default();
34371        __struct.framerate = buf.get_f32_le();
34372        __struct.bitrate = buf.get_u32_le();
34373        let tmp = buf.get_u16_le();
34374        __struct.flags = VideoStreamStatusFlags::from_bits(
34375            tmp & VideoStreamStatusFlags::all().bits(),
34376        )
34377        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34378            flag_type: "VideoStreamStatusFlags",
34379            value: tmp as u32,
34380        })?;
34381        __struct.resolution_h = buf.get_u16_le();
34382        __struct.resolution_v = buf.get_u16_le();
34383        __struct.rotation = buf.get_u16_le();
34384        __struct.hfov = buf.get_u16_le();
34385        __struct.stream_id = buf.get_u8();
34386        __struct.camera_device_id = buf.get_u8();
34387        Ok(__struct)
34388    }
34389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34390        let mut __tmp = BytesMut::new(bytes);
34391        #[allow(clippy::absurd_extreme_comparisons)]
34392        #[allow(unused_comparisons)]
34393        if __tmp.remaining() < Self::ENCODED_LEN {
34394            panic!(
34395                "buffer is too small (need {} bytes, but got {})",
34396                Self::ENCODED_LEN,
34397                __tmp.remaining(),
34398            )
34399        }
34400        __tmp.put_f32_le(self.framerate);
34401        __tmp.put_u32_le(self.bitrate);
34402        __tmp.put_u16_le(self.flags.bits());
34403        __tmp.put_u16_le(self.resolution_h);
34404        __tmp.put_u16_le(self.resolution_v);
34405        __tmp.put_u16_le(self.rotation);
34406        __tmp.put_u16_le(self.hfov);
34407        __tmp.put_u8(self.stream_id);
34408        if matches!(version, MavlinkVersion::V2) {
34409            __tmp.put_u8(self.camera_device_id);
34410            let len = __tmp.len();
34411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34412        } else {
34413            __tmp.len()
34414        }
34415    }
34416}
34417#[doc = "Local position/attitude estimate from a vision source."]
34418#[doc = ""]
34419#[doc = "ID: 102"]
34420#[derive(Debug, Clone, PartialEq)]
34421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34423#[cfg_attr(feature = "ts", derive(TS))]
34424#[cfg_attr(feature = "ts", ts(export))]
34425pub struct VISION_POSITION_ESTIMATE_DATA {
34426    #[doc = "Timestamp (UNIX time or time since system boot)"]
34427    pub usec: u64,
34428    #[doc = "Local X position"]
34429    pub x: f32,
34430    #[doc = "Local Y position"]
34431    pub y: f32,
34432    #[doc = "Local Z position"]
34433    pub z: f32,
34434    #[doc = "Roll angle"]
34435    pub roll: f32,
34436    #[doc = "Pitch angle"]
34437    pub pitch: f32,
34438    #[doc = "Yaw angle"]
34439    pub yaw: f32,
34440    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
34441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34444    pub covariance: [f32; 21],
34445    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34447    pub reset_counter: u8,
34448}
34449impl VISION_POSITION_ESTIMATE_DATA {
34450    pub const ENCODED_LEN: usize = 117usize;
34451    pub const DEFAULT: Self = Self {
34452        usec: 0_u64,
34453        x: 0.0_f32,
34454        y: 0.0_f32,
34455        z: 0.0_f32,
34456        roll: 0.0_f32,
34457        pitch: 0.0_f32,
34458        yaw: 0.0_f32,
34459        covariance: [0.0_f32; 21usize],
34460        reset_counter: 0_u8,
34461    };
34462    #[cfg(feature = "arbitrary")]
34463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34464        use arbitrary::{Arbitrary, Unstructured};
34465        let mut buf = [0u8; 1024];
34466        rng.fill_bytes(&mut buf);
34467        let mut unstructured = Unstructured::new(&buf);
34468        Self::arbitrary(&mut unstructured).unwrap_or_default()
34469    }
34470}
34471impl Default for VISION_POSITION_ESTIMATE_DATA {
34472    fn default() -> Self {
34473        Self::DEFAULT.clone()
34474    }
34475}
34476impl MessageData for VISION_POSITION_ESTIMATE_DATA {
34477    type Message = MavMessage;
34478    const ID: u32 = 102u32;
34479    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
34480    const EXTRA_CRC: u8 = 158u8;
34481    const ENCODED_LEN: usize = 117usize;
34482    fn deser(
34483        _version: MavlinkVersion,
34484        __input: &[u8],
34485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34486        let avail_len = __input.len();
34487        let mut payload_buf = [0; Self::ENCODED_LEN];
34488        let mut buf = if avail_len < Self::ENCODED_LEN {
34489            payload_buf[0..avail_len].copy_from_slice(__input);
34490            Bytes::new(&payload_buf)
34491        } else {
34492            Bytes::new(__input)
34493        };
34494        let mut __struct = Self::default();
34495        __struct.usec = buf.get_u64_le();
34496        __struct.x = buf.get_f32_le();
34497        __struct.y = buf.get_f32_le();
34498        __struct.z = buf.get_f32_le();
34499        __struct.roll = buf.get_f32_le();
34500        __struct.pitch = buf.get_f32_le();
34501        __struct.yaw = buf.get_f32_le();
34502        for v in &mut __struct.covariance {
34503            let val = buf.get_f32_le();
34504            *v = val;
34505        }
34506        __struct.reset_counter = buf.get_u8();
34507        Ok(__struct)
34508    }
34509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34510        let mut __tmp = BytesMut::new(bytes);
34511        #[allow(clippy::absurd_extreme_comparisons)]
34512        #[allow(unused_comparisons)]
34513        if __tmp.remaining() < Self::ENCODED_LEN {
34514            panic!(
34515                "buffer is too small (need {} bytes, but got {})",
34516                Self::ENCODED_LEN,
34517                __tmp.remaining(),
34518            )
34519        }
34520        __tmp.put_u64_le(self.usec);
34521        __tmp.put_f32_le(self.x);
34522        __tmp.put_f32_le(self.y);
34523        __tmp.put_f32_le(self.z);
34524        __tmp.put_f32_le(self.roll);
34525        __tmp.put_f32_le(self.pitch);
34526        __tmp.put_f32_le(self.yaw);
34527        if matches!(version, MavlinkVersion::V2) {
34528            for val in &self.covariance {
34529                __tmp.put_f32_le(*val);
34530            }
34531            __tmp.put_u8(self.reset_counter);
34532            let len = __tmp.len();
34533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34534        } else {
34535            __tmp.len()
34536        }
34537    }
34538}
34539#[doc = "Speed estimate from a vision source."]
34540#[doc = ""]
34541#[doc = "ID: 103"]
34542#[derive(Debug, Clone, PartialEq)]
34543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34545#[cfg_attr(feature = "ts", derive(TS))]
34546#[cfg_attr(feature = "ts", ts(export))]
34547pub struct VISION_SPEED_ESTIMATE_DATA {
34548    #[doc = "Timestamp (UNIX time or time since system boot)"]
34549    pub usec: u64,
34550    #[doc = "Global X speed"]
34551    pub x: f32,
34552    #[doc = "Global Y speed"]
34553    pub y: f32,
34554    #[doc = "Global Z speed"]
34555    pub z: f32,
34556    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
34557    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34558    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34559    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34560    pub covariance: [f32; 9],
34561    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34563    pub reset_counter: u8,
34564}
34565impl VISION_SPEED_ESTIMATE_DATA {
34566    pub const ENCODED_LEN: usize = 57usize;
34567    pub const DEFAULT: Self = Self {
34568        usec: 0_u64,
34569        x: 0.0_f32,
34570        y: 0.0_f32,
34571        z: 0.0_f32,
34572        covariance: [0.0_f32; 9usize],
34573        reset_counter: 0_u8,
34574    };
34575    #[cfg(feature = "arbitrary")]
34576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34577        use arbitrary::{Arbitrary, Unstructured};
34578        let mut buf = [0u8; 1024];
34579        rng.fill_bytes(&mut buf);
34580        let mut unstructured = Unstructured::new(&buf);
34581        Self::arbitrary(&mut unstructured).unwrap_or_default()
34582    }
34583}
34584impl Default for VISION_SPEED_ESTIMATE_DATA {
34585    fn default() -> Self {
34586        Self::DEFAULT.clone()
34587    }
34588}
34589impl MessageData for VISION_SPEED_ESTIMATE_DATA {
34590    type Message = MavMessage;
34591    const ID: u32 = 103u32;
34592    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
34593    const EXTRA_CRC: u8 = 208u8;
34594    const ENCODED_LEN: usize = 57usize;
34595    fn deser(
34596        _version: MavlinkVersion,
34597        __input: &[u8],
34598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34599        let avail_len = __input.len();
34600        let mut payload_buf = [0; Self::ENCODED_LEN];
34601        let mut buf = if avail_len < Self::ENCODED_LEN {
34602            payload_buf[0..avail_len].copy_from_slice(__input);
34603            Bytes::new(&payload_buf)
34604        } else {
34605            Bytes::new(__input)
34606        };
34607        let mut __struct = Self::default();
34608        __struct.usec = buf.get_u64_le();
34609        __struct.x = buf.get_f32_le();
34610        __struct.y = buf.get_f32_le();
34611        __struct.z = buf.get_f32_le();
34612        for v in &mut __struct.covariance {
34613            let val = buf.get_f32_le();
34614            *v = val;
34615        }
34616        __struct.reset_counter = buf.get_u8();
34617        Ok(__struct)
34618    }
34619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34620        let mut __tmp = BytesMut::new(bytes);
34621        #[allow(clippy::absurd_extreme_comparisons)]
34622        #[allow(unused_comparisons)]
34623        if __tmp.remaining() < Self::ENCODED_LEN {
34624            panic!(
34625                "buffer is too small (need {} bytes, but got {})",
34626                Self::ENCODED_LEN,
34627                __tmp.remaining(),
34628            )
34629        }
34630        __tmp.put_u64_le(self.usec);
34631        __tmp.put_f32_le(self.x);
34632        __tmp.put_f32_le(self.y);
34633        __tmp.put_f32_le(self.z);
34634        if matches!(version, MavlinkVersion::V2) {
34635            for val in &self.covariance {
34636                __tmp.put_f32_le(*val);
34637            }
34638            __tmp.put_u8(self.reset_counter);
34639            let len = __tmp.len();
34640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34641        } else {
34642            __tmp.len()
34643        }
34644    }
34645}
34646#[doc = "Cumulative distance traveled for each reported wheel."]
34647#[doc = ""]
34648#[doc = "ID: 9000"]
34649#[derive(Debug, Clone, PartialEq)]
34650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34652#[cfg_attr(feature = "ts", derive(TS))]
34653#[cfg_attr(feature = "ts", ts(export))]
34654pub struct WHEEL_DISTANCE_DATA {
34655    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34656    pub time_usec: u64,
34657    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
34658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34660    pub distance: [f64; 16],
34661    #[doc = "Number of wheels reported."]
34662    pub count: u8,
34663}
34664impl WHEEL_DISTANCE_DATA {
34665    pub const ENCODED_LEN: usize = 137usize;
34666    pub const DEFAULT: Self = Self {
34667        time_usec: 0_u64,
34668        distance: [0.0_f64; 16usize],
34669        count: 0_u8,
34670    };
34671    #[cfg(feature = "arbitrary")]
34672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34673        use arbitrary::{Arbitrary, Unstructured};
34674        let mut buf = [0u8; 1024];
34675        rng.fill_bytes(&mut buf);
34676        let mut unstructured = Unstructured::new(&buf);
34677        Self::arbitrary(&mut unstructured).unwrap_or_default()
34678    }
34679}
34680impl Default for WHEEL_DISTANCE_DATA {
34681    fn default() -> Self {
34682        Self::DEFAULT.clone()
34683    }
34684}
34685impl MessageData for WHEEL_DISTANCE_DATA {
34686    type Message = MavMessage;
34687    const ID: u32 = 9000u32;
34688    const NAME: &'static str = "WHEEL_DISTANCE";
34689    const EXTRA_CRC: u8 = 113u8;
34690    const ENCODED_LEN: usize = 137usize;
34691    fn deser(
34692        _version: MavlinkVersion,
34693        __input: &[u8],
34694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34695        let avail_len = __input.len();
34696        let mut payload_buf = [0; Self::ENCODED_LEN];
34697        let mut buf = if avail_len < Self::ENCODED_LEN {
34698            payload_buf[0..avail_len].copy_from_slice(__input);
34699            Bytes::new(&payload_buf)
34700        } else {
34701            Bytes::new(__input)
34702        };
34703        let mut __struct = Self::default();
34704        __struct.time_usec = buf.get_u64_le();
34705        for v in &mut __struct.distance {
34706            let val = buf.get_f64_le();
34707            *v = val;
34708        }
34709        __struct.count = buf.get_u8();
34710        Ok(__struct)
34711    }
34712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34713        let mut __tmp = BytesMut::new(bytes);
34714        #[allow(clippy::absurd_extreme_comparisons)]
34715        #[allow(unused_comparisons)]
34716        if __tmp.remaining() < Self::ENCODED_LEN {
34717            panic!(
34718                "buffer is too small (need {} bytes, but got {})",
34719                Self::ENCODED_LEN,
34720                __tmp.remaining(),
34721            )
34722        }
34723        __tmp.put_u64_le(self.time_usec);
34724        for val in &self.distance {
34725            __tmp.put_f64_le(*val);
34726        }
34727        __tmp.put_u8(self.count);
34728        if matches!(version, MavlinkVersion::V2) {
34729            let len = __tmp.len();
34730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34731        } else {
34732            __tmp.len()
34733        }
34734    }
34735}
34736#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34737#[doc = ""]
34738#[doc = "ID: 299"]
34739#[derive(Debug, Clone, PartialEq)]
34740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34742#[cfg_attr(feature = "ts", derive(TS))]
34743#[cfg_attr(feature = "ts", ts(export))]
34744pub struct WIFI_CONFIG_AP_DATA {
34745    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
34746    #[cfg_attr(feature = "ts", ts(type = "string"))]
34747    pub ssid: CharArray<32>,
34748    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
34749    #[cfg_attr(feature = "ts", ts(type = "string"))]
34750    pub password: CharArray<64>,
34751    #[doc = "WiFi Mode."]
34752    #[cfg_attr(feature = "serde", serde(default))]
34753    pub mode: WifiConfigApMode,
34754    #[doc = "Message acceptance response (sent back to GS)."]
34755    #[cfg_attr(feature = "serde", serde(default))]
34756    pub response: WifiConfigApResponse,
34757}
34758impl WIFI_CONFIG_AP_DATA {
34759    pub const ENCODED_LEN: usize = 98usize;
34760    pub const DEFAULT: Self = Self {
34761        ssid: CharArray::new([0_u8; 32usize]),
34762        password: CharArray::new([0_u8; 64usize]),
34763        mode: WifiConfigApMode::DEFAULT,
34764        response: WifiConfigApResponse::DEFAULT,
34765    };
34766    #[cfg(feature = "arbitrary")]
34767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34768        use arbitrary::{Arbitrary, Unstructured};
34769        let mut buf = [0u8; 1024];
34770        rng.fill_bytes(&mut buf);
34771        let mut unstructured = Unstructured::new(&buf);
34772        Self::arbitrary(&mut unstructured).unwrap_or_default()
34773    }
34774}
34775impl Default for WIFI_CONFIG_AP_DATA {
34776    fn default() -> Self {
34777        Self::DEFAULT.clone()
34778    }
34779}
34780impl MessageData for WIFI_CONFIG_AP_DATA {
34781    type Message = MavMessage;
34782    const ID: u32 = 299u32;
34783    const NAME: &'static str = "WIFI_CONFIG_AP";
34784    const EXTRA_CRC: u8 = 19u8;
34785    const ENCODED_LEN: usize = 98usize;
34786    fn deser(
34787        _version: MavlinkVersion,
34788        __input: &[u8],
34789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34790        let avail_len = __input.len();
34791        let mut payload_buf = [0; Self::ENCODED_LEN];
34792        let mut buf = if avail_len < Self::ENCODED_LEN {
34793            payload_buf[0..avail_len].copy_from_slice(__input);
34794            Bytes::new(&payload_buf)
34795        } else {
34796            Bytes::new(__input)
34797        };
34798        let mut __struct = Self::default();
34799        let mut tmp = [0_u8; 32usize];
34800        for v in &mut tmp {
34801            *v = buf.get_u8();
34802        }
34803        __struct.ssid = CharArray::new(tmp);
34804        let mut tmp = [0_u8; 64usize];
34805        for v in &mut tmp {
34806            *v = buf.get_u8();
34807        }
34808        __struct.password = CharArray::new(tmp);
34809        let tmp = buf.get_i8();
34810        __struct.mode =
34811            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34812                enum_type: "WifiConfigApMode",
34813                value: tmp as u32,
34814            })?;
34815        let tmp = buf.get_i8();
34816        __struct.response =
34817            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34818                enum_type: "WifiConfigApResponse",
34819                value: tmp as u32,
34820            })?;
34821        Ok(__struct)
34822    }
34823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34824        let mut __tmp = BytesMut::new(bytes);
34825        #[allow(clippy::absurd_extreme_comparisons)]
34826        #[allow(unused_comparisons)]
34827        if __tmp.remaining() < Self::ENCODED_LEN {
34828            panic!(
34829                "buffer is too small (need {} bytes, but got {})",
34830                Self::ENCODED_LEN,
34831                __tmp.remaining(),
34832            )
34833        }
34834        for val in &self.ssid {
34835            __tmp.put_u8(*val);
34836        }
34837        for val in &self.password {
34838            __tmp.put_u8(*val);
34839        }
34840        if matches!(version, MavlinkVersion::V2) {
34841            __tmp.put_i8(self.mode as i8);
34842            __tmp.put_i8(self.response as i8);
34843            let len = __tmp.len();
34844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34845        } else {
34846            __tmp.len()
34847        }
34848    }
34849}
34850#[doc = "Winch status."]
34851#[doc = ""]
34852#[doc = "ID: 9005"]
34853#[derive(Debug, Clone, PartialEq)]
34854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34856#[cfg_attr(feature = "ts", derive(TS))]
34857#[cfg_attr(feature = "ts", ts(export))]
34858pub struct WINCH_STATUS_DATA {
34859    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34860    pub time_usec: u64,
34861    #[doc = "Length of line released. NaN if unknown"]
34862    pub line_length: f32,
34863    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34864    pub speed: f32,
34865    #[doc = "Tension on the line. NaN if unknown"]
34866    pub tension: f32,
34867    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34868    pub voltage: f32,
34869    #[doc = "Current draw from the winch. NaN if unknown"]
34870    pub current: f32,
34871    #[doc = "Status flags"]
34872    pub status: MavWinchStatusFlag,
34873    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34874    pub temperature: i16,
34875}
34876impl WINCH_STATUS_DATA {
34877    pub const ENCODED_LEN: usize = 34usize;
34878    pub const DEFAULT: Self = Self {
34879        time_usec: 0_u64,
34880        line_length: 0.0_f32,
34881        speed: 0.0_f32,
34882        tension: 0.0_f32,
34883        voltage: 0.0_f32,
34884        current: 0.0_f32,
34885        status: MavWinchStatusFlag::DEFAULT,
34886        temperature: 0_i16,
34887    };
34888    #[cfg(feature = "arbitrary")]
34889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34890        use arbitrary::{Arbitrary, Unstructured};
34891        let mut buf = [0u8; 1024];
34892        rng.fill_bytes(&mut buf);
34893        let mut unstructured = Unstructured::new(&buf);
34894        Self::arbitrary(&mut unstructured).unwrap_or_default()
34895    }
34896}
34897impl Default for WINCH_STATUS_DATA {
34898    fn default() -> Self {
34899        Self::DEFAULT.clone()
34900    }
34901}
34902impl MessageData for WINCH_STATUS_DATA {
34903    type Message = MavMessage;
34904    const ID: u32 = 9005u32;
34905    const NAME: &'static str = "WINCH_STATUS";
34906    const EXTRA_CRC: u8 = 117u8;
34907    const ENCODED_LEN: usize = 34usize;
34908    fn deser(
34909        _version: MavlinkVersion,
34910        __input: &[u8],
34911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34912        let avail_len = __input.len();
34913        let mut payload_buf = [0; Self::ENCODED_LEN];
34914        let mut buf = if avail_len < Self::ENCODED_LEN {
34915            payload_buf[0..avail_len].copy_from_slice(__input);
34916            Bytes::new(&payload_buf)
34917        } else {
34918            Bytes::new(__input)
34919        };
34920        let mut __struct = Self::default();
34921        __struct.time_usec = buf.get_u64_le();
34922        __struct.line_length = buf.get_f32_le();
34923        __struct.speed = buf.get_f32_le();
34924        __struct.tension = buf.get_f32_le();
34925        __struct.voltage = buf.get_f32_le();
34926        __struct.current = buf.get_f32_le();
34927        let tmp = buf.get_u32_le();
34928        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
34929            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34930                flag_type: "MavWinchStatusFlag",
34931                value: tmp as u32,
34932            })?;
34933        __struct.temperature = buf.get_i16_le();
34934        Ok(__struct)
34935    }
34936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34937        let mut __tmp = BytesMut::new(bytes);
34938        #[allow(clippy::absurd_extreme_comparisons)]
34939        #[allow(unused_comparisons)]
34940        if __tmp.remaining() < Self::ENCODED_LEN {
34941            panic!(
34942                "buffer is too small (need {} bytes, but got {})",
34943                Self::ENCODED_LEN,
34944                __tmp.remaining(),
34945            )
34946        }
34947        __tmp.put_u64_le(self.time_usec);
34948        __tmp.put_f32_le(self.line_length);
34949        __tmp.put_f32_le(self.speed);
34950        __tmp.put_f32_le(self.tension);
34951        __tmp.put_f32_le(self.voltage);
34952        __tmp.put_f32_le(self.current);
34953        __tmp.put_u32_le(self.status.bits());
34954        __tmp.put_i16_le(self.temperature);
34955        if matches!(version, MavlinkVersion::V2) {
34956            let len = __tmp.len();
34957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34958        } else {
34959            __tmp.len()
34960        }
34961    }
34962}
34963#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34964#[doc = ""]
34965#[doc = "ID: 231"]
34966#[derive(Debug, Clone, PartialEq)]
34967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34969#[cfg_attr(feature = "ts", derive(TS))]
34970#[cfg_attr(feature = "ts", ts(export))]
34971pub struct WIND_COV_DATA {
34972    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34973    pub time_usec: u64,
34974    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34975    pub wind_x: f32,
34976    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34977    pub wind_y: f32,
34978    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34979    pub wind_z: f32,
34980    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34981    pub var_horiz: f32,
34982    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34983    pub var_vert: f32,
34984    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34985    pub wind_alt: f32,
34986    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34987    pub horiz_accuracy: f32,
34988    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34989    pub vert_accuracy: f32,
34990}
34991impl WIND_COV_DATA {
34992    pub const ENCODED_LEN: usize = 40usize;
34993    pub const DEFAULT: Self = Self {
34994        time_usec: 0_u64,
34995        wind_x: 0.0_f32,
34996        wind_y: 0.0_f32,
34997        wind_z: 0.0_f32,
34998        var_horiz: 0.0_f32,
34999        var_vert: 0.0_f32,
35000        wind_alt: 0.0_f32,
35001        horiz_accuracy: 0.0_f32,
35002        vert_accuracy: 0.0_f32,
35003    };
35004    #[cfg(feature = "arbitrary")]
35005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35006        use arbitrary::{Arbitrary, Unstructured};
35007        let mut buf = [0u8; 1024];
35008        rng.fill_bytes(&mut buf);
35009        let mut unstructured = Unstructured::new(&buf);
35010        Self::arbitrary(&mut unstructured).unwrap_or_default()
35011    }
35012}
35013impl Default for WIND_COV_DATA {
35014    fn default() -> Self {
35015        Self::DEFAULT.clone()
35016    }
35017}
35018impl MessageData for WIND_COV_DATA {
35019    type Message = MavMessage;
35020    const ID: u32 = 231u32;
35021    const NAME: &'static str = "WIND_COV";
35022    const EXTRA_CRC: u8 = 105u8;
35023    const ENCODED_LEN: usize = 40usize;
35024    fn deser(
35025        _version: MavlinkVersion,
35026        __input: &[u8],
35027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35028        let avail_len = __input.len();
35029        let mut payload_buf = [0; Self::ENCODED_LEN];
35030        let mut buf = if avail_len < Self::ENCODED_LEN {
35031            payload_buf[0..avail_len].copy_from_slice(__input);
35032            Bytes::new(&payload_buf)
35033        } else {
35034            Bytes::new(__input)
35035        };
35036        let mut __struct = Self::default();
35037        __struct.time_usec = buf.get_u64_le();
35038        __struct.wind_x = buf.get_f32_le();
35039        __struct.wind_y = buf.get_f32_le();
35040        __struct.wind_z = buf.get_f32_le();
35041        __struct.var_horiz = buf.get_f32_le();
35042        __struct.var_vert = buf.get_f32_le();
35043        __struct.wind_alt = buf.get_f32_le();
35044        __struct.horiz_accuracy = buf.get_f32_le();
35045        __struct.vert_accuracy = buf.get_f32_le();
35046        Ok(__struct)
35047    }
35048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35049        let mut __tmp = BytesMut::new(bytes);
35050        #[allow(clippy::absurd_extreme_comparisons)]
35051        #[allow(unused_comparisons)]
35052        if __tmp.remaining() < Self::ENCODED_LEN {
35053            panic!(
35054                "buffer is too small (need {} bytes, but got {})",
35055                Self::ENCODED_LEN,
35056                __tmp.remaining(),
35057            )
35058        }
35059        __tmp.put_u64_le(self.time_usec);
35060        __tmp.put_f32_le(self.wind_x);
35061        __tmp.put_f32_le(self.wind_y);
35062        __tmp.put_f32_le(self.wind_z);
35063        __tmp.put_f32_le(self.var_horiz);
35064        __tmp.put_f32_le(self.var_vert);
35065        __tmp.put_f32_le(self.wind_alt);
35066        __tmp.put_f32_le(self.horiz_accuracy);
35067        __tmp.put_f32_le(self.vert_accuracy);
35068        if matches!(version, MavlinkVersion::V2) {
35069            let len = __tmp.len();
35070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35071        } else {
35072            __tmp.len()
35073        }
35074    }
35075}
35076#[derive(Clone, PartialEq, Debug)]
35077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35078#[cfg_attr(feature = "serde", serde(tag = "type"))]
35079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35080#[cfg_attr(feature = "ts", derive(TS))]
35081#[cfg_attr(feature = "ts", ts(export))]
35082#[repr(u32)]
35083pub enum MavMessage {
35084    #[doc = "Set the vehicle attitude and body angular rates."]
35085    #[doc = ""]
35086    #[doc = "ID: 140"]
35087    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
35088    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
35089    #[doc = ""]
35090    #[doc = "ID: 375"]
35091    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
35092    #[doc = "The location and information of an ADSB vehicle."]
35093    #[doc = ""]
35094    #[doc = "ID: 246"]
35095    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
35096    #[doc = "The airspeed measured by sensors and IMU."]
35097    #[doc = ""]
35098    #[doc = "ID: 182"]
35099    AIRSPEEDS(AIRSPEEDS_DATA),
35100    #[doc = "The location and information of an AIS vessel."]
35101    #[doc = ""]
35102    #[doc = "ID: 301"]
35103    AIS_VESSEL(AIS_VESSEL_DATA),
35104    #[doc = "The current system altitude."]
35105    #[doc = ""]
35106    #[doc = "ID: 141"]
35107    ALTITUDE(ALTITUDE_DATA),
35108    #[doc = "The altitude measured by sensors and IMU."]
35109    #[doc = ""]
35110    #[doc = "ID: 181"]
35111    ALTITUDES(ALTITUDES_DATA),
35112    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
35113    #[doc = ""]
35114    #[doc = "ID: 30"]
35115    ATTITUDE(ATTITUDE_DATA),
35116    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
35117    #[doc = ""]
35118    #[doc = "ID: 31"]
35119    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
35120    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
35121    #[doc = ""]
35122    #[doc = "ID: 61"]
35123    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
35124    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
35125    #[doc = ""]
35126    #[doc = "ID: 83"]
35127    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
35128    #[doc = "Motion capture attitude and position."]
35129    #[doc = ""]
35130    #[doc = "ID: 138"]
35131    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
35132    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
35133    #[doc = ""]
35134    #[doc = "ID: 7"]
35135    AUTH_KEY(AUTH_KEY_DATA),
35136    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
35137    #[doc = ""]
35138    #[doc = "ID: 286"]
35139    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
35140    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
35141    #[doc = ""]
35142    #[doc = "ID: 148"]
35143    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
35144    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
35145    #[doc = ""]
35146    #[doc = "ID: 435"]
35147    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
35148    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
35149    #[doc = ""]
35150    #[doc = "ID: 437"]
35151    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
35152    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
35153    #[doc = ""]
35154    #[doc = "ID: 372"]
35155    BATTERY_INFO(BATTERY_INFO_DATA),
35156    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
35157    #[doc = ""]
35158    #[doc = "ID: 147"]
35159    BATTERY_STATUS(BATTERY_STATUS_DATA),
35160    #[doc = "Report button state change."]
35161    #[doc = ""]
35162    #[doc = "ID: 257"]
35163    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
35164    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35165    #[doc = ""]
35166    #[doc = "ID: 262"]
35167    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
35168    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35169    #[doc = ""]
35170    #[doc = "ID: 271"]
35171    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
35172    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
35173    #[doc = ""]
35174    #[doc = "ID: 263"]
35175    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
35176    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35177    #[doc = ""]
35178    #[doc = "ID: 259"]
35179    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
35180    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35181    #[doc = ""]
35182    #[doc = "ID: 260"]
35183    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
35184    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
35185    #[doc = ""]
35186    #[doc = "ID: 277"]
35187    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
35188    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
35189    #[doc = ""]
35190    #[doc = "ID: 276"]
35191    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
35192    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
35193    #[doc = ""]
35194    #[doc = "ID: 275"]
35195    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
35196    #[doc = "Camera-IMU triggering and synchronisation message."]
35197    #[doc = ""]
35198    #[doc = "ID: 112"]
35199    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
35200    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
35201    #[doc = ""]
35202    #[doc = "ID: 387"]
35203    CANFD_FRAME(CANFD_FRAME_DATA),
35204    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
35205    #[doc = ""]
35206    #[doc = "ID: 388"]
35207    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
35208    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
35209    #[doc = ""]
35210    #[doc = "ID: 386"]
35211    CAN_FRAME(CAN_FRAME_DATA),
35212    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35213    #[doc = ""]
35214    #[doc = "ID: 336"]
35215    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
35216    #[doc = "Report current used cellular network status."]
35217    #[doc = ""]
35218    #[doc = "ID: 334"]
35219    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
35220    #[doc = "Request to control this MAV."]
35221    #[doc = ""]
35222    #[doc = "ID: 5"]
35223    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
35224    #[doc = "Accept / deny control of this MAV."]
35225    #[doc = ""]
35226    #[doc = "ID: 6"]
35227    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
35228    #[doc = "Information about a potential collision."]
35229    #[doc = ""]
35230    #[doc = "ID: 247"]
35231    COLLISION(COLLISION_DATA),
35232    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35233    #[doc = ""]
35234    #[doc = "ID: 77"]
35235    COMMAND_ACK(COMMAND_ACK_DATA),
35236    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35237    #[doc = ""]
35238    #[doc = "ID: 80"]
35239    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
35240    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35241    #[doc = ""]
35242    #[doc = "ID: 75"]
35243    COMMAND_INT(COMMAND_INT_DATA),
35244    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35245    #[doc = ""]
35246    #[doc = "ID: 76"]
35247    COMMAND_LONG(COMMAND_LONG_DATA),
35248    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
35249    #[doc = ""]
35250    #[doc = "ID: 395"]
35251    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
35252    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
35253    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
35254    #[doc = ""]
35255    #[doc = "ID: 396"]
35256    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
35257    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
35258    #[doc = ""]
35259    #[doc = "ID: 397"]
35260    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
35261    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
35262    #[doc = ""]
35263    #[doc = "ID: 146"]
35264    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
35265    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
35266    #[doc = ""]
35267    #[doc = "ID: 411"]
35268    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
35269    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
35270    #[doc = ""]
35271    #[doc = "ID: 436"]
35272    CURRENT_MODE(CURRENT_MODE_DATA),
35273    #[doc = "Data stream status information."]
35274    #[doc = ""]
35275    #[doc = "ID: 67"]
35276    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
35277    DATA_STREAM(DATA_STREAM_DATA),
35278    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35279    #[doc = ""]
35280    #[doc = "ID: 130"]
35281    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
35282    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
35283    #[doc = ""]
35284    #[doc = "ID: 254"]
35285    DEBUG(DEBUG_DATA),
35286    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
35287    #[doc = ""]
35288    #[doc = "ID: 350"]
35289    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
35290    #[doc = "To debug something using a named 3D vector."]
35291    #[doc = ""]
35292    #[doc = "ID: 250"]
35293    DEBUG_VECT(DEBUG_VECT_DATA),
35294    #[doc = "Distance sensor information for an onboard rangefinder."]
35295    #[doc = ""]
35296    #[doc = "ID: 132"]
35297    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
35298    #[doc = "EFI status output."]
35299    #[doc = ""]
35300    #[doc = "ID: 225"]
35301    EFI_STATUS(EFI_STATUS_DATA),
35302    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35303    #[doc = ""]
35304    #[doc = "ID: 131"]
35305    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
35306    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
35307    #[doc = ""]
35308    #[doc = "ID: 290"]
35309    ESC_INFO(ESC_INFO_DATA),
35310    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
35311    #[doc = ""]
35312    #[doc = "ID: 291"]
35313    ESC_STATUS(ESC_STATUS_DATA),
35314    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
35315    #[doc = ""]
35316    #[doc = "ID: 230"]
35317    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
35318    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
35319    #[doc = ""]
35320    #[doc = "ID: 410"]
35321    EVENT(EVENT_DATA),
35322    #[doc = "Provides state for additional features."]
35323    #[doc = ""]
35324    #[doc = "ID: 245"]
35325    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
35326    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
35327    #[doc = ""]
35328    #[doc = "ID: 162"]
35329    FENCE_STATUS(FENCE_STATUS_DATA),
35330    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
35331    #[doc = ""]
35332    #[doc = "ID: 110"]
35333    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
35334    #[doc = "Flexifunction type and parameters for component at function index from buffer."]
35335    #[doc = ""]
35336    #[doc = "ID: 152"]
35337    FLEXIFUNCTION_BUFFER_FUNCTION(FLEXIFUNCTION_BUFFER_FUNCTION_DATA),
35338    #[doc = "Flexifunction type and parameters for component at function index from buffer."]
35339    #[doc = ""]
35340    #[doc = "ID: 153"]
35341    FLEXIFUNCTION_BUFFER_FUNCTION_ACK(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA),
35342    #[doc = "Acknowldge success or failure of a flexifunction command."]
35343    #[doc = ""]
35344    #[doc = "ID: 157"]
35345    FLEXIFUNCTION_COMMAND(FLEXIFUNCTION_COMMAND_DATA),
35346    #[doc = "Acknowldge success or failure of a flexifunction command."]
35347    #[doc = ""]
35348    #[doc = "ID: 158"]
35349    FLEXIFUNCTION_COMMAND_ACK(FLEXIFUNCTION_COMMAND_ACK_DATA),
35350    #[doc = "Acknowldge success or failure of a flexifunction command."]
35351    #[doc = ""]
35352    #[doc = "ID: 155"]
35353    FLEXIFUNCTION_DIRECTORY(FLEXIFUNCTION_DIRECTORY_DATA),
35354    #[doc = "Acknowldge success or failure of a flexifunction command."]
35355    #[doc = ""]
35356    #[doc = "ID: 156"]
35357    FLEXIFUNCTION_DIRECTORY_ACK(FLEXIFUNCTION_DIRECTORY_ACK_DATA),
35358    #[doc = "Request reading of flexifunction data."]
35359    #[doc = ""]
35360    #[doc = "ID: 151"]
35361    FLEXIFUNCTION_READ_REQ(FLEXIFUNCTION_READ_REQ_DATA),
35362    #[doc = "Depreciated but used as a compiler flag.  Do not remove."]
35363    #[doc = ""]
35364    #[doc = "ID: 150"]
35365    FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA),
35366    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
35367    #[doc = ""]
35368    #[doc = "ID: 264"]
35369    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
35370    #[doc = "Current motion information from a designated system."]
35371    #[doc = ""]
35372    #[doc = "ID: 144"]
35373    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
35374    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
35375    #[doc = ""]
35376    #[doc = "ID: 371"]
35377    FUEL_STATUS(FUEL_STATUS_DATA),
35378    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
35379    #[doc = ""]
35380    #[doc = "ID: 373"]
35381    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
35382    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
35383    #[doc = ""]
35384    #[doc = "ID: 285"]
35385    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
35386    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
35387    #[doc = ""]
35388    #[doc = "ID: 283"]
35389    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
35390    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
35391    #[doc = ""]
35392    #[doc = "ID: 284"]
35393    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
35394    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
35395    #[doc = ""]
35396    #[doc = "ID: 280"]
35397    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
35398    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35399    #[doc = ""]
35400    #[doc = "ID: 282"]
35401    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
35402    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35403    #[doc = ""]
35404    #[doc = "ID: 288"]
35405    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
35406    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
35407    #[doc = ""]
35408    #[doc = "ID: 287"]
35409    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
35410    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
35411    #[doc = ""]
35412    #[doc = "ID: 281"]
35413    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
35414    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
35415    #[doc = ""]
35416    #[doc = "ID: 33"]
35417    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
35418    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
35419    #[doc = ""]
35420    #[doc = "ID: 63"]
35421    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
35422    #[doc = "Global position/attitude estimate from a vision source."]
35423    #[doc = ""]
35424    #[doc = "ID: 101"]
35425    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
35426    #[doc = "Second GPS data."]
35427    #[doc = ""]
35428    #[doc = "ID: 124"]
35429    GPS2_RAW(GPS2_RAW_DATA),
35430    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35431    #[doc = ""]
35432    #[doc = "ID: 128"]
35433    GPS2_RTK(GPS2_RTK_DATA),
35434    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
35435    #[doc = ""]
35436    #[doc = "ID: 49"]
35437    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
35438    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
35439    #[doc = ""]
35440    #[doc = "ID: 123"]
35441    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
35442    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
35443    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
35444    #[doc = ""]
35445    #[doc = "ID: 232"]
35446    GPS_INPUT(GPS_INPUT_DATA),
35447    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35448    #[doc = ""]
35449    #[doc = "ID: 24"]
35450    GPS_RAW_INT(GPS_RAW_INT_DATA),
35451    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
35452    #[doc = ""]
35453    #[doc = "ID: 233"]
35454    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
35455    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35456    #[doc = ""]
35457    #[doc = "ID: 127"]
35458    GPS_RTK(GPS_RTK_DATA),
35459    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
35460    #[doc = ""]
35461    #[doc = "ID: 25"]
35462    GPS_STATUS(GPS_STATUS_DATA),
35463    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
35464    #[doc = ""]
35465    #[doc = "ID: 0"]
35466    HEARTBEAT(HEARTBEAT_DATA),
35467    #[doc = "The IMU readings in SI units in NED body frame."]
35468    #[doc = ""]
35469    #[doc = "ID: 105"]
35470    HIGHRES_IMU(HIGHRES_IMU_DATA),
35471    #[doc = "Message appropriate for high latency connections like Iridium."]
35472    #[doc = ""]
35473    #[doc = "ID: 234"]
35474    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
35475    HIGH_LATENCY(HIGH_LATENCY_DATA),
35476    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
35477    #[doc = ""]
35478    #[doc = "ID: 235"]
35479    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
35480    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
35481    #[doc = ""]
35482    #[doc = "ID: 93"]
35483    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
35484    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
35485    #[doc = ""]
35486    #[doc = "ID: 91"]
35487    HIL_CONTROLS(HIL_CONTROLS_DATA),
35488    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35489    #[doc = ""]
35490    #[doc = "ID: 113"]
35491    HIL_GPS(HIL_GPS_DATA),
35492    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
35493    #[doc = ""]
35494    #[doc = "ID: 114"]
35495    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
35496    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
35497    #[doc = ""]
35498    #[doc = "ID: 92"]
35499    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
35500    #[doc = "The IMU readings in SI units in NED body frame."]
35501    #[doc = ""]
35502    #[doc = "ID: 107"]
35503    HIL_SENSOR(HIL_SENSOR_DATA),
35504    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35505    #[doc = ""]
35506    #[doc = "ID: 90"]
35507    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
35508    HIL_STATE(HIL_STATE_DATA),
35509    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35510    #[doc = ""]
35511    #[doc = "ID: 115"]
35512    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
35513    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
35514    #[doc = ""]
35515    #[doc = "ID: 242"]
35516    HOME_POSITION(HOME_POSITION_DATA),
35517    #[doc = "Temperature and humidity from hygrometer."]
35518    #[doc = ""]
35519    #[doc = "ID: 12920"]
35520    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
35521    #[doc = "Illuminator status."]
35522    #[doc = ""]
35523    #[doc = "ID: 440"]
35524    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
35525    #[doc = "Status of the Iridium SBD link."]
35526    #[doc = ""]
35527    #[doc = "ID: 335"]
35528    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
35529    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
35530    #[doc = ""]
35531    #[doc = "ID: 149"]
35532    LANDING_TARGET(LANDING_TARGET_DATA),
35533    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
35534    #[doc = ""]
35535    #[doc = "ID: 8"]
35536    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
35537    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35538    #[doc = ""]
35539    #[doc = "ID: 32"]
35540    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
35541    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35542    #[doc = ""]
35543    #[doc = "ID: 64"]
35544    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
35545    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35546    #[doc = ""]
35547    #[doc = "ID: 89"]
35548    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
35549    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
35550    #[doc = ""]
35551    #[doc = "ID: 268"]
35552    LOGGING_ACK(LOGGING_ACK_DATA),
35553    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
35554    #[doc = ""]
35555    #[doc = "ID: 266"]
35556    LOGGING_DATA(LOGGING_DATA_DATA),
35557    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
35558    #[doc = ""]
35559    #[doc = "ID: 267"]
35560    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
35561    #[doc = "Reply to LOG_REQUEST_DATA."]
35562    #[doc = ""]
35563    #[doc = "ID: 120"]
35564    LOG_DATA(LOG_DATA_DATA),
35565    #[doc = "Reply to LOG_REQUEST_LIST."]
35566    #[doc = ""]
35567    #[doc = "ID: 118"]
35568    LOG_ENTRY(LOG_ENTRY_DATA),
35569    #[doc = "Erase all logs."]
35570    #[doc = ""]
35571    #[doc = "ID: 121"]
35572    LOG_ERASE(LOG_ERASE_DATA),
35573    #[doc = "Request a chunk of a log."]
35574    #[doc = ""]
35575    #[doc = "ID: 119"]
35576    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
35577    #[doc = "Stop log transfer and resume normal logging."]
35578    #[doc = ""]
35579    #[doc = "ID: 122"]
35580    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
35581    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
35582    #[doc = ""]
35583    #[doc = "ID: 117"]
35584    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
35585    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
35586    #[doc = ""]
35587    #[doc = "ID: 192"]
35588    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
35589    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
35590    #[doc = ""]
35591    #[doc = "ID: 69"]
35592    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
35593    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
35594    #[doc = ""]
35595    #[doc = "ID: 81"]
35596    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
35597    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35598    #[doc = ""]
35599    #[doc = "ID: 249"]
35600    MEMORY_VECT(MEMORY_VECT_DATA),
35601    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
35602    #[doc = ""]
35603    #[doc = "ID: 244"]
35604    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
35605    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
35606    #[doc = ""]
35607    #[doc = "ID: 47"]
35608    MISSION_ACK(MISSION_ACK_DATA),
35609    #[doc = "Delete all mission items at once."]
35610    #[doc = ""]
35611    #[doc = "ID: 45"]
35612    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
35613    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
35614    #[doc = ""]
35615    #[doc = "ID: 44"]
35616    MISSION_COUNT(MISSION_COUNT_DATA),
35617    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
35618    #[doc = ""]
35619    #[doc = "ID: 42"]
35620    MISSION_CURRENT(MISSION_CURRENT_DATA),
35621    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35622    #[doc = ""]
35623    #[doc = "ID: 39"]
35624    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
35625    MISSION_ITEM(MISSION_ITEM_DATA),
35626    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35627    #[doc = ""]
35628    #[doc = "ID: 73"]
35629    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
35630    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
35631    #[doc = ""]
35632    #[doc = "ID: 46"]
35633    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
35634    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
35635    #[doc = ""]
35636    #[doc = "ID: 40"]
35637    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
35638    MISSION_REQUEST(MISSION_REQUEST_DATA),
35639    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
35640    #[doc = ""]
35641    #[doc = "ID: 51"]
35642    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
35643    #[doc = "Request the overall list of mission items from the system/component."]
35644    #[doc = ""]
35645    #[doc = "ID: 43"]
35646    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
35647    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
35648    #[doc = ""]
35649    #[doc = "ID: 37"]
35650    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
35651    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
35652    #[doc = ""]
35653    #[doc = "ID: 41"]
35654    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
35655    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
35656    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
35657    #[doc = ""]
35658    #[doc = "ID: 38"]
35659    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
35660    #[doc = "Orientation of a mount."]
35661    #[doc = ""]
35662    #[doc = "ID: 265"]
35663    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
35664    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
35665    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35666    #[doc = ""]
35667    #[doc = "ID: 251"]
35668    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
35669    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35670    #[doc = ""]
35671    #[doc = "ID: 252"]
35672    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
35673    #[doc = "The state of the navigation and position controller."]
35674    #[doc = ""]
35675    #[doc = "ID: 62"]
35676    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
35677    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
35678    #[doc = ""]
35679    #[doc = "ID: 330"]
35680    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
35681    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
35682    #[doc = ""]
35683    #[doc = "ID: 331"]
35684    ODOMETRY(ODOMETRY_DATA),
35685    #[doc = "Hardware status sent by an onboard computer."]
35686    #[doc = ""]
35687    #[doc = "ID: 390"]
35688    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
35689    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
35690    #[doc = ""]
35691    #[doc = "ID: 12918"]
35692    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
35693    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
35694    #[doc = ""]
35695    #[doc = "ID: 12902"]
35696    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
35697    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
35698    #[doc = ""]
35699    #[doc = "ID: 12900"]
35700    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
35701    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
35702    #[doc = ""]
35703    #[doc = "ID: 12901"]
35704    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
35705    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
35706    #[doc = ""]
35707    #[doc = "ID: 12915"]
35708    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
35709    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
35710    #[doc = ""]
35711    #[doc = "ID: 12905"]
35712    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
35713    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
35714    #[doc = ""]
35715    #[doc = "ID: 12903"]
35716    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
35717    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
35718    #[doc = ""]
35719    #[doc = "ID: 12904"]
35720    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
35721    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
35722    #[doc = ""]
35723    #[doc = "ID: 12919"]
35724    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
35725    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
35726    #[doc = ""]
35727    #[doc = "ID: 100"]
35728    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
35729    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
35730    #[doc = ""]
35731    #[doc = "ID: 106"]
35732    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
35733    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
35734    #[doc = ""]
35735    #[doc = "ID: 360"]
35736    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
35737    #[doc = "Response from a PARAM_EXT_SET message."]
35738    #[doc = ""]
35739    #[doc = "ID: 324"]
35740    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
35741    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
35742    #[doc = ""]
35743    #[doc = "ID: 321"]
35744    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
35745    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
35746    #[doc = ""]
35747    #[doc = "ID: 320"]
35748    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
35749    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
35750    #[doc = ""]
35751    #[doc = "ID: 323"]
35752    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
35753    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
35754    #[doc = ""]
35755    #[doc = "ID: 322"]
35756    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
35757    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
35758    #[doc = ""]
35759    #[doc = "ID: 50"]
35760    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
35761    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35762    #[doc = ""]
35763    #[doc = "ID: 21"]
35764    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
35765    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
35766    #[doc = ""]
35767    #[doc = "ID: 20"]
35768    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
35769    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35770    #[doc = ""]
35771    #[doc = "ID: 23"]
35772    PARAM_SET(PARAM_SET_DATA),
35773    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35774    #[doc = ""]
35775    #[doc = "ID: 22"]
35776    PARAM_VALUE(PARAM_VALUE_DATA),
35777    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
35778    #[doc = ""]
35779    #[doc = "ID: 4"]
35780    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
35781    PING(PING_DATA),
35782    #[doc = "Control vehicle tone generation (buzzer)."]
35783    #[doc = ""]
35784    #[doc = "ID: 258"]
35785    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
35786    PLAY_TUNE(PLAY_TUNE_DATA),
35787    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
35788    #[doc = ""]
35789    #[doc = "ID: 400"]
35790    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
35791    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
35792    #[doc = ""]
35793    #[doc = "ID: 87"]
35794    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
35795    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
35796    #[doc = ""]
35797    #[doc = "ID: 85"]
35798    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
35799    #[doc = "Power supply status."]
35800    #[doc = ""]
35801    #[doc = "ID: 125"]
35802    POWER_STATUS(POWER_STATUS_DATA),
35803    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
35804    #[doc = ""]
35805    #[doc = "ID: 300"]
35806    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
35807    #[doc = "Status generated by radio and injected into MAVLink stream."]
35808    #[doc = ""]
35809    #[doc = "ID: 109"]
35810    RADIO_STATUS(RADIO_STATUS_DATA),
35811    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
35812    #[doc = ""]
35813    #[doc = "ID: 27"]
35814    RAW_IMU(RAW_IMU_DATA),
35815    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
35816    #[doc = ""]
35817    #[doc = "ID: 28"]
35818    RAW_PRESSURE(RAW_PRESSURE_DATA),
35819    #[doc = "RPM sensor data message."]
35820    #[doc = ""]
35821    #[doc = "ID: 339"]
35822    RAW_RPM(RAW_RPM_DATA),
35823    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35824    #[doc = ""]
35825    #[doc = "ID: 65"]
35826    RC_CHANNELS(RC_CHANNELS_DATA),
35827    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
35828    #[doc = ""]
35829    #[doc = "ID: 70"]
35830    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
35831    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35832    #[doc = ""]
35833    #[doc = "ID: 35"]
35834    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
35835    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
35836    #[doc = ""]
35837    #[doc = "ID: 34"]
35838    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
35839    #[doc = "Request a data stream."]
35840    #[doc = ""]
35841    #[doc = "ID: 66"]
35842    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
35843    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
35844    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
35845    #[doc = ""]
35846    #[doc = "ID: 412"]
35847    REQUEST_EVENT(REQUEST_EVENT_DATA),
35848    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
35849    #[doc = ""]
35850    #[doc = "ID: 142"]
35851    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
35852    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
35853    #[doc = ""]
35854    #[doc = "ID: 413"]
35855    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
35856    #[doc = "Read out the safety zone the MAV currently assumes."]
35857    #[doc = ""]
35858    #[doc = "ID: 55"]
35859    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
35860    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35861    #[doc = ""]
35862    #[doc = "ID: 54"]
35863    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35864    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35865    #[doc = ""]
35866    #[doc = "ID: 26"]
35867    SCALED_IMU(SCALED_IMU_DATA),
35868    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35869    #[doc = ""]
35870    #[doc = "ID: 116"]
35871    SCALED_IMU2(SCALED_IMU2_DATA),
35872    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35873    #[doc = ""]
35874    #[doc = "ID: 129"]
35875    SCALED_IMU3(SCALED_IMU3_DATA),
35876    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35877    #[doc = ""]
35878    #[doc = "ID: 29"]
35879    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35880    #[doc = "Barometer readings for 2nd barometer."]
35881    #[doc = ""]
35882    #[doc = "ID: 137"]
35883    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35884    #[doc = "Barometer readings for 3rd barometer."]
35885    #[doc = ""]
35886    #[doc = "ID: 143"]
35887    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35888    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35889    #[doc = ""]
35890    #[doc = "ID: 126"]
35891    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35892    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F13: format."]
35893    #[doc = ""]
35894    #[doc = "ID: 177"]
35895    SERIAL_UDB_EXTRA_F13(SERIAL_UDB_EXTRA_F13_DATA),
35896    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F14: format."]
35897    #[doc = ""]
35898    #[doc = "ID: 178"]
35899    SERIAL_UDB_EXTRA_F14(SERIAL_UDB_EXTRA_F14_DATA),
35900    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F15 format."]
35901    #[doc = ""]
35902    #[doc = "ID: 179"]
35903    SERIAL_UDB_EXTRA_F15(SERIAL_UDB_EXTRA_F15_DATA),
35904    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F16 format."]
35905    #[doc = ""]
35906    #[doc = "ID: 180"]
35907    SERIAL_UDB_EXTRA_F16(SERIAL_UDB_EXTRA_F16_DATA),
35908    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F17 format."]
35909    #[doc = ""]
35910    #[doc = "ID: 183"]
35911    SERIAL_UDB_EXTRA_F17(SERIAL_UDB_EXTRA_F17_DATA),
35912    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F18 format."]
35913    #[doc = ""]
35914    #[doc = "ID: 184"]
35915    SERIAL_UDB_EXTRA_F18(SERIAL_UDB_EXTRA_F18_DATA),
35916    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F19 format."]
35917    #[doc = ""]
35918    #[doc = "ID: 185"]
35919    SERIAL_UDB_EXTRA_F19(SERIAL_UDB_EXTRA_F19_DATA),
35920    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F20 format."]
35921    #[doc = ""]
35922    #[doc = "ID: 186"]
35923    SERIAL_UDB_EXTRA_F20(SERIAL_UDB_EXTRA_F20_DATA),
35924    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F21 format."]
35925    #[doc = ""]
35926    #[doc = "ID: 187"]
35927    SERIAL_UDB_EXTRA_F21(SERIAL_UDB_EXTRA_F21_DATA),
35928    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F22 format."]
35929    #[doc = ""]
35930    #[doc = "ID: 188"]
35931    SERIAL_UDB_EXTRA_F22(SERIAL_UDB_EXTRA_F22_DATA),
35932    #[doc = "Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A."]
35933    #[doc = ""]
35934    #[doc = "ID: 170"]
35935    SERIAL_UDB_EXTRA_F2_A(SERIAL_UDB_EXTRA_F2_A_DATA),
35936    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B."]
35937    #[doc = ""]
35938    #[doc = "ID: 171"]
35939    SERIAL_UDB_EXTRA_F2_B(SERIAL_UDB_EXTRA_F2_B_DATA),
35940    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F4: format."]
35941    #[doc = ""]
35942    #[doc = "ID: 172"]
35943    SERIAL_UDB_EXTRA_F4(SERIAL_UDB_EXTRA_F4_DATA),
35944    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F5: format."]
35945    #[doc = ""]
35946    #[doc = "ID: 173"]
35947    SERIAL_UDB_EXTRA_F5(SERIAL_UDB_EXTRA_F5_DATA),
35948    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F6: format."]
35949    #[doc = ""]
35950    #[doc = "ID: 174"]
35951    SERIAL_UDB_EXTRA_F6(SERIAL_UDB_EXTRA_F6_DATA),
35952    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F7: format."]
35953    #[doc = ""]
35954    #[doc = "ID: 175"]
35955    SERIAL_UDB_EXTRA_F7(SERIAL_UDB_EXTRA_F7_DATA),
35956    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F8: format."]
35957    #[doc = ""]
35958    #[doc = "ID: 176"]
35959    SERIAL_UDB_EXTRA_F8(SERIAL_UDB_EXTRA_F8_DATA),
35960    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35961    #[doc = ""]
35962    #[doc = "ID: 36"]
35963    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35964    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35965    #[doc = ""]
35966    #[doc = "ID: 256"]
35967    SETUP_SIGNING(SETUP_SIGNING_DATA),
35968    #[doc = "Set the vehicle attitude and body angular rates."]
35969    #[doc = ""]
35970    #[doc = "ID: 139"]
35971    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35972    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35973    #[doc = ""]
35974    #[doc = "ID: 82"]
35975    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35976    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35977    #[doc = ""]
35978    #[doc = "ID: 48"]
35979    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35980    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35981    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35982    #[doc = ""]
35983    #[doc = "ID: 243"]
35984    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35985    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35986    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35987    #[doc = ""]
35988    #[doc = "ID: 11"]
35989    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35990    SET_MODE(SET_MODE_DATA),
35991    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35992    #[doc = ""]
35993    #[doc = "ID: 86"]
35994    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35995    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35996    #[doc = ""]
35997    #[doc = "ID: 84"]
35998    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35999    #[doc = "Status of simulation environment, if used."]
36000    #[doc = ""]
36001    #[doc = "ID: 108"]
36002    SIM_STATE(SIM_STATE_DATA),
36003    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
36004    #[doc = ""]
36005    #[doc = "ID: 370"]
36006    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
36007    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
36008    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
36009    #[doc = ""]
36010    #[doc = "ID: 253"]
36011    STATUSTEXT(STATUSTEXT_DATA),
36012    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
36013    #[doc = ""]
36014    #[doc = "ID: 261"]
36015    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
36016    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
36017    #[doc = ""]
36018    #[doc = "ID: 401"]
36019    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
36020    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
36021    #[doc = ""]
36022    #[doc = "ID: 2"]
36023    SYSTEM_TIME(SYSTEM_TIME_DATA),
36024    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
36025    #[doc = ""]
36026    #[doc = "ID: 1"]
36027    SYS_STATUS(SYS_STATUS_DATA),
36028    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
36029    #[doc = ""]
36030    #[doc = "ID: 135"]
36031    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
36032    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36033    #[doc = ""]
36034    #[doc = "ID: 134"]
36035    TERRAIN_DATA(TERRAIN_DATA_DATA),
36036    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36037    #[doc = ""]
36038    #[doc = "ID: 136"]
36039    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
36040    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36041    #[doc = ""]
36042    #[doc = "ID: 133"]
36043    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
36044    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
36045    #[doc = ""]
36046    #[doc = "ID: 111"]
36047    TIMESYNC(TIMESYNC_DATA),
36048    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
36049    #[doc = ""]
36050    #[doc = "ID: 380"]
36051    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
36052    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
36053    #[doc = ""]
36054    #[doc = "ID: 333"]
36055    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
36056    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
36057    #[doc = ""]
36058    #[doc = "ID: 332"]
36059    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
36060    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
36061    #[doc = ""]
36062    #[doc = "ID: 385"]
36063    TUNNEL(TUNNEL_DATA),
36064    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
36065    #[doc = ""]
36066    #[doc = "ID: 311"]
36067    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
36068    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
36069    #[doc = ""]
36070    #[doc = "ID: 310"]
36071    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
36072    #[doc = "The global position resulting from GPS and sensor fusion."]
36073    #[doc = ""]
36074    #[doc = "ID: 340"]
36075    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
36076    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
36077    #[doc = ""]
36078    #[doc = "ID: 248"]
36079    V2_EXTENSION(V2_EXTENSION_DATA),
36080    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
36081    #[doc = ""]
36082    #[doc = "ID: 74"]
36083    VFR_HUD(VFR_HUD_DATA),
36084    #[doc = "Vibration levels and accelerometer clipping."]
36085    #[doc = ""]
36086    #[doc = "ID: 241"]
36087    VIBRATION(VIBRATION_DATA),
36088    #[doc = "Global position estimate from a Vicon motion system source."]
36089    #[doc = ""]
36090    #[doc = "ID: 104"]
36091    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
36092    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
36093    #[doc = ""]
36094    #[doc = "ID: 269"]
36095    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
36096    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
36097    #[doc = ""]
36098    #[doc = "ID: 270"]
36099    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
36100    #[doc = "Local position/attitude estimate from a vision source."]
36101    #[doc = ""]
36102    #[doc = "ID: 102"]
36103    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
36104    #[doc = "Speed estimate from a vision source."]
36105    #[doc = ""]
36106    #[doc = "ID: 103"]
36107    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
36108    #[doc = "Cumulative distance traveled for each reported wheel."]
36109    #[doc = ""]
36110    #[doc = "ID: 9000"]
36111    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
36112    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
36113    #[doc = ""]
36114    #[doc = "ID: 299"]
36115    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
36116    #[doc = "Winch status."]
36117    #[doc = ""]
36118    #[doc = "ID: 9005"]
36119    WINCH_STATUS(WINCH_STATUS_DATA),
36120    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
36121    #[doc = ""]
36122    #[doc = "ID: 231"]
36123    WIND_COV(WIND_COV_DATA),
36124}
36125impl MavMessage {
36126    pub const fn all_ids() -> &'static [u32] {
36127        &[
36128            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
36129            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
36130            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
36131            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
36132            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
36133            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
36134            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
36135            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
36136            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
36137            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
36138            148u32, 149u32, 150u32, 151u32, 152u32, 153u32, 155u32, 156u32, 157u32, 158u32, 162u32,
36139            170u32, 171u32, 172u32, 173u32, 174u32, 175u32, 176u32, 177u32, 178u32, 179u32, 180u32,
36140            181u32, 182u32, 183u32, 184u32, 185u32, 186u32, 187u32, 188u32, 192u32, 225u32, 230u32,
36141            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
36142            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
36143            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
36144            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
36145            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
36146            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
36147            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
36148            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
36149            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
36150            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
36151        ]
36152    }
36153}
36154impl Message for MavMessage {
36155    fn parse(
36156        version: MavlinkVersion,
36157        id: u32,
36158        payload: &[u8],
36159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36160        match id {
36161            ACTUATOR_CONTROL_TARGET_DATA::ID => {
36162                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36163                    .map(Self::ACTUATOR_CONTROL_TARGET)
36164            }
36165            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
36166                .map(Self::ACTUATOR_OUTPUT_STATUS),
36167            ADSB_VEHICLE_DATA::ID => {
36168                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
36169            }
36170            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::deser(version, payload).map(Self::AIRSPEEDS),
36171            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
36172            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
36173            ALTITUDES_DATA::ID => ALTITUDES_DATA::deser(version, payload).map(Self::ALTITUDES),
36174            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
36175            ATTITUDE_QUATERNION_DATA::ID => {
36176                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
36177            }
36178            ATTITUDE_QUATERNION_COV_DATA::ID => {
36179                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
36180                    .map(Self::ATTITUDE_QUATERNION_COV)
36181            }
36182            ATTITUDE_TARGET_DATA::ID => {
36183                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
36184            }
36185            ATT_POS_MOCAP_DATA::ID => {
36186                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
36187            }
36188            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
36189            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36190                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
36191                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
36192            }
36193            AUTOPILOT_VERSION_DATA::ID => {
36194                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
36195            }
36196            AVAILABLE_MODES_DATA::ID => {
36197                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
36198            }
36199            AVAILABLE_MODES_MONITOR_DATA::ID => {
36200                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
36201                    .map(Self::AVAILABLE_MODES_MONITOR)
36202            }
36203            BATTERY_INFO_DATA::ID => {
36204                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
36205            }
36206            BATTERY_STATUS_DATA::ID => {
36207                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
36208            }
36209            BUTTON_CHANGE_DATA::ID => {
36210                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
36211            }
36212            CAMERA_CAPTURE_STATUS_DATA::ID => {
36213                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
36214            }
36215            CAMERA_FOV_STATUS_DATA::ID => {
36216                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
36217            }
36218            CAMERA_IMAGE_CAPTURED_DATA::ID => {
36219                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
36220            }
36221            CAMERA_INFORMATION_DATA::ID => {
36222                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
36223            }
36224            CAMERA_SETTINGS_DATA::ID => {
36225                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
36226            }
36227            CAMERA_THERMAL_RANGE_DATA::ID => {
36228                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
36229            }
36230            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
36231                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
36232                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
36233            }
36234            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
36235                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
36236                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
36237            }
36238            CAMERA_TRIGGER_DATA::ID => {
36239                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
36240            }
36241            CANFD_FRAME_DATA::ID => {
36242                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
36243            }
36244            CAN_FILTER_MODIFY_DATA::ID => {
36245                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
36246            }
36247            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
36248            CELLULAR_CONFIG_DATA::ID => {
36249                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
36250            }
36251            CELLULAR_STATUS_DATA::ID => {
36252                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
36253            }
36254            CHANGE_OPERATOR_CONTROL_DATA::ID => {
36255                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
36256                    .map(Self::CHANGE_OPERATOR_CONTROL)
36257            }
36258            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
36259                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
36260                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
36261            }
36262            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
36263            COMMAND_ACK_DATA::ID => {
36264                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
36265            }
36266            COMMAND_CANCEL_DATA::ID => {
36267                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
36268            }
36269            COMMAND_INT_DATA::ID => {
36270                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
36271            }
36272            COMMAND_LONG_DATA::ID => {
36273                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
36274            }
36275            COMPONENT_INFORMATION_DATA::ID => {
36276                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
36277            }
36278            COMPONENT_INFORMATION_BASIC_DATA::ID => {
36279                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
36280                    .map(Self::COMPONENT_INFORMATION_BASIC)
36281            }
36282            COMPONENT_METADATA_DATA::ID => {
36283                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
36284            }
36285            CONTROL_SYSTEM_STATE_DATA::ID => {
36286                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
36287            }
36288            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
36289                .map(Self::CURRENT_EVENT_SEQUENCE),
36290            CURRENT_MODE_DATA::ID => {
36291                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
36292            }
36293            DATA_STREAM_DATA::ID => {
36294                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
36295            }
36296            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
36297                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
36298                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
36299            }
36300            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
36301            DEBUG_FLOAT_ARRAY_DATA::ID => {
36302                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
36303            }
36304            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
36305            DISTANCE_SENSOR_DATA::ID => {
36306                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
36307            }
36308            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
36309            ENCAPSULATED_DATA_DATA::ID => {
36310                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
36311            }
36312            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
36313            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
36314            ESTIMATOR_STATUS_DATA::ID => {
36315                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
36316            }
36317            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
36318            EXTENDED_SYS_STATE_DATA::ID => {
36319                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
36320            }
36321            FENCE_STATUS_DATA::ID => {
36322                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
36323            }
36324            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
36325                .map(Self::FILE_TRANSFER_PROTOCOL),
36326            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => {
36327                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::deser(version, payload)
36328                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION)
36329            }
36330            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
36331                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::deser(version, payload)
36332                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK)
36333            }
36334            FLEXIFUNCTION_COMMAND_DATA::ID => {
36335                FLEXIFUNCTION_COMMAND_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_COMMAND)
36336            }
36337            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => {
36338                FLEXIFUNCTION_COMMAND_ACK_DATA::deser(version, payload)
36339                    .map(Self::FLEXIFUNCTION_COMMAND_ACK)
36340            }
36341            FLEXIFUNCTION_DIRECTORY_DATA::ID => {
36342                FLEXIFUNCTION_DIRECTORY_DATA::deser(version, payload)
36343                    .map(Self::FLEXIFUNCTION_DIRECTORY)
36344            }
36345            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => {
36346                FLEXIFUNCTION_DIRECTORY_ACK_DATA::deser(version, payload)
36347                    .map(Self::FLEXIFUNCTION_DIRECTORY_ACK)
36348            }
36349            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::deser(version, payload)
36350                .map(Self::FLEXIFUNCTION_READ_REQ),
36351            FLEXIFUNCTION_SET_DATA::ID => {
36352                FLEXIFUNCTION_SET_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_SET)
36353            }
36354            FLIGHT_INFORMATION_DATA::ID => {
36355                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
36356            }
36357            FOLLOW_TARGET_DATA::ID => {
36358                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
36359            }
36360            FUEL_STATUS_DATA::ID => {
36361                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
36362            }
36363            GENERATOR_STATUS_DATA::ID => {
36364                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
36365            }
36366            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
36367                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
36368                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
36369            }
36370            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
36371                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
36372                    .map(Self::GIMBAL_DEVICE_INFORMATION)
36373            }
36374            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
36375                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
36376                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
36377            }
36378            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
36379                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
36380                    .map(Self::GIMBAL_MANAGER_INFORMATION)
36381            }
36382            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
36383                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
36384                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
36385            }
36386            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36387                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
36388                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
36389            }
36390            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
36391                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
36392                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
36393            }
36394            GIMBAL_MANAGER_STATUS_DATA::ID => {
36395                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
36396            }
36397            GLOBAL_POSITION_INT_DATA::ID => {
36398                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
36399            }
36400            GLOBAL_POSITION_INT_COV_DATA::ID => {
36401                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
36402                    .map(Self::GLOBAL_POSITION_INT_COV)
36403            }
36404            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36405                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36406                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
36407            }
36408            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
36409            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
36410            GPS_GLOBAL_ORIGIN_DATA::ID => {
36411                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
36412            }
36413            GPS_INJECT_DATA_DATA::ID => {
36414                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
36415            }
36416            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
36417            GPS_RAW_INT_DATA::ID => {
36418                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
36419            }
36420            GPS_RTCM_DATA_DATA::ID => {
36421                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
36422            }
36423            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
36424            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
36425            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
36426            HIGHRES_IMU_DATA::ID => {
36427                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
36428            }
36429            HIGH_LATENCY_DATA::ID => {
36430                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
36431            }
36432            HIGH_LATENCY2_DATA::ID => {
36433                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
36434            }
36435            HIL_ACTUATOR_CONTROLS_DATA::ID => {
36436                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
36437            }
36438            HIL_CONTROLS_DATA::ID => {
36439                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
36440            }
36441            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
36442            HIL_OPTICAL_FLOW_DATA::ID => {
36443                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
36444            }
36445            HIL_RC_INPUTS_RAW_DATA::ID => {
36446                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
36447            }
36448            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
36449            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
36450            HIL_STATE_QUATERNION_DATA::ID => {
36451                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
36452            }
36453            HOME_POSITION_DATA::ID => {
36454                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
36455            }
36456            HYGROMETER_SENSOR_DATA::ID => {
36457                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
36458            }
36459            ILLUMINATOR_STATUS_DATA::ID => {
36460                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
36461            }
36462            ISBD_LINK_STATUS_DATA::ID => {
36463                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
36464            }
36465            LANDING_TARGET_DATA::ID => {
36466                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
36467            }
36468            LINK_NODE_STATUS_DATA::ID => {
36469                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
36470            }
36471            LOCAL_POSITION_NED_DATA::ID => {
36472                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
36473            }
36474            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
36475                .map(Self::LOCAL_POSITION_NED_COV),
36476            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36477                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
36478                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
36479            }
36480            LOGGING_ACK_DATA::ID => {
36481                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
36482            }
36483            LOGGING_DATA_DATA::ID => {
36484                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
36485            }
36486            LOGGING_DATA_ACKED_DATA::ID => {
36487                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
36488            }
36489            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
36490            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
36491            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
36492            LOG_REQUEST_DATA_DATA::ID => {
36493                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
36494            }
36495            LOG_REQUEST_END_DATA::ID => {
36496                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
36497            }
36498            LOG_REQUEST_LIST_DATA::ID => {
36499                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
36500            }
36501            MAG_CAL_REPORT_DATA::ID => {
36502                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
36503            }
36504            MANUAL_CONTROL_DATA::ID => {
36505                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
36506            }
36507            MANUAL_SETPOINT_DATA::ID => {
36508                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
36509            }
36510            MEMORY_VECT_DATA::ID => {
36511                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
36512            }
36513            MESSAGE_INTERVAL_DATA::ID => {
36514                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
36515            }
36516            MISSION_ACK_DATA::ID => {
36517                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
36518            }
36519            MISSION_CLEAR_ALL_DATA::ID => {
36520                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
36521            }
36522            MISSION_COUNT_DATA::ID => {
36523                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
36524            }
36525            MISSION_CURRENT_DATA::ID => {
36526                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
36527            }
36528            MISSION_ITEM_DATA::ID => {
36529                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
36530            }
36531            MISSION_ITEM_INT_DATA::ID => {
36532                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
36533            }
36534            MISSION_ITEM_REACHED_DATA::ID => {
36535                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
36536            }
36537            MISSION_REQUEST_DATA::ID => {
36538                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
36539            }
36540            MISSION_REQUEST_INT_DATA::ID => {
36541                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
36542            }
36543            MISSION_REQUEST_LIST_DATA::ID => {
36544                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
36545            }
36546            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
36547                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
36548                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
36549            }
36550            MISSION_SET_CURRENT_DATA::ID => {
36551                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
36552            }
36553            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
36554                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
36555                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
36556            }
36557            MOUNT_ORIENTATION_DATA::ID => {
36558                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
36559            }
36560            NAMED_VALUE_FLOAT_DATA::ID => {
36561                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
36562            }
36563            NAMED_VALUE_INT_DATA::ID => {
36564                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
36565            }
36566            NAV_CONTROLLER_OUTPUT_DATA::ID => {
36567                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
36568            }
36569            OBSTACLE_DISTANCE_DATA::ID => {
36570                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
36571            }
36572            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
36573            ONBOARD_COMPUTER_STATUS_DATA::ID => {
36574                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
36575                    .map(Self::ONBOARD_COMPUTER_STATUS)
36576            }
36577            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
36578                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
36579                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
36580            }
36581            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
36582                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
36583                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
36584            }
36585            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
36586                .map(Self::OPEN_DRONE_ID_BASIC_ID),
36587            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
36588                .map(Self::OPEN_DRONE_ID_LOCATION),
36589            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
36590                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
36591                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
36592            }
36593            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
36594                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
36595                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
36596            }
36597            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
36598                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
36599            }
36600            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
36601                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
36602            }
36603            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
36604                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
36605                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
36606            }
36607            OPTICAL_FLOW_DATA::ID => {
36608                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
36609            }
36610            OPTICAL_FLOW_RAD_DATA::ID => {
36611                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
36612            }
36613            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
36614                .map(Self::ORBIT_EXECUTION_STATUS),
36615            PARAM_EXT_ACK_DATA::ID => {
36616                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
36617            }
36618            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
36619                .map(Self::PARAM_EXT_REQUEST_LIST),
36620            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
36621                .map(Self::PARAM_EXT_REQUEST_READ),
36622            PARAM_EXT_SET_DATA::ID => {
36623                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
36624            }
36625            PARAM_EXT_VALUE_DATA::ID => {
36626                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
36627            }
36628            PARAM_MAP_RC_DATA::ID => {
36629                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
36630            }
36631            PARAM_REQUEST_LIST_DATA::ID => {
36632                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
36633            }
36634            PARAM_REQUEST_READ_DATA::ID => {
36635                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
36636            }
36637            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
36638            PARAM_VALUE_DATA::ID => {
36639                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
36640            }
36641            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
36642            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
36643            PLAY_TUNE_V2_DATA::ID => {
36644                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
36645            }
36646            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36647                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36648                    .map(Self::POSITION_TARGET_GLOBAL_INT)
36649            }
36650            POSITION_TARGET_LOCAL_NED_DATA::ID => {
36651                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36652                    .map(Self::POSITION_TARGET_LOCAL_NED)
36653            }
36654            POWER_STATUS_DATA::ID => {
36655                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
36656            }
36657            PROTOCOL_VERSION_DATA::ID => {
36658                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
36659            }
36660            RADIO_STATUS_DATA::ID => {
36661                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
36662            }
36663            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
36664            RAW_PRESSURE_DATA::ID => {
36665                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
36666            }
36667            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
36668            RC_CHANNELS_DATA::ID => {
36669                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
36670            }
36671            RC_CHANNELS_OVERRIDE_DATA::ID => {
36672                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
36673            }
36674            RC_CHANNELS_RAW_DATA::ID => {
36675                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
36676            }
36677            RC_CHANNELS_SCALED_DATA::ID => {
36678                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
36679            }
36680            REQUEST_DATA_STREAM_DATA::ID => {
36681                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
36682            }
36683            REQUEST_EVENT_DATA::ID => {
36684                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
36685            }
36686            RESOURCE_REQUEST_DATA::ID => {
36687                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
36688            }
36689            RESPONSE_EVENT_ERROR_DATA::ID => {
36690                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
36691            }
36692            SAFETY_ALLOWED_AREA_DATA::ID => {
36693                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
36694            }
36695            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
36696                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
36697                    .map(Self::SAFETY_SET_ALLOWED_AREA)
36698            }
36699            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
36700            SCALED_IMU2_DATA::ID => {
36701                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
36702            }
36703            SCALED_IMU3_DATA::ID => {
36704                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
36705            }
36706            SCALED_PRESSURE_DATA::ID => {
36707                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
36708            }
36709            SCALED_PRESSURE2_DATA::ID => {
36710                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
36711            }
36712            SCALED_PRESSURE3_DATA::ID => {
36713                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
36714            }
36715            SERIAL_CONTROL_DATA::ID => {
36716                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
36717            }
36718            SERIAL_UDB_EXTRA_F13_DATA::ID => {
36719                SERIAL_UDB_EXTRA_F13_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F13)
36720            }
36721            SERIAL_UDB_EXTRA_F14_DATA::ID => {
36722                SERIAL_UDB_EXTRA_F14_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F14)
36723            }
36724            SERIAL_UDB_EXTRA_F15_DATA::ID => {
36725                SERIAL_UDB_EXTRA_F15_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F15)
36726            }
36727            SERIAL_UDB_EXTRA_F16_DATA::ID => {
36728                SERIAL_UDB_EXTRA_F16_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F16)
36729            }
36730            SERIAL_UDB_EXTRA_F17_DATA::ID => {
36731                SERIAL_UDB_EXTRA_F17_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F17)
36732            }
36733            SERIAL_UDB_EXTRA_F18_DATA::ID => {
36734                SERIAL_UDB_EXTRA_F18_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F18)
36735            }
36736            SERIAL_UDB_EXTRA_F19_DATA::ID => {
36737                SERIAL_UDB_EXTRA_F19_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F19)
36738            }
36739            SERIAL_UDB_EXTRA_F20_DATA::ID => {
36740                SERIAL_UDB_EXTRA_F20_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F20)
36741            }
36742            SERIAL_UDB_EXTRA_F21_DATA::ID => {
36743                SERIAL_UDB_EXTRA_F21_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F21)
36744            }
36745            SERIAL_UDB_EXTRA_F22_DATA::ID => {
36746                SERIAL_UDB_EXTRA_F22_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F22)
36747            }
36748            SERIAL_UDB_EXTRA_F2_A_DATA::ID => {
36749                SERIAL_UDB_EXTRA_F2_A_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_A)
36750            }
36751            SERIAL_UDB_EXTRA_F2_B_DATA::ID => {
36752                SERIAL_UDB_EXTRA_F2_B_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_B)
36753            }
36754            SERIAL_UDB_EXTRA_F4_DATA::ID => {
36755                SERIAL_UDB_EXTRA_F4_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F4)
36756            }
36757            SERIAL_UDB_EXTRA_F5_DATA::ID => {
36758                SERIAL_UDB_EXTRA_F5_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F5)
36759            }
36760            SERIAL_UDB_EXTRA_F6_DATA::ID => {
36761                SERIAL_UDB_EXTRA_F6_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F6)
36762            }
36763            SERIAL_UDB_EXTRA_F7_DATA::ID => {
36764                SERIAL_UDB_EXTRA_F7_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F7)
36765            }
36766            SERIAL_UDB_EXTRA_F8_DATA::ID => {
36767                SERIAL_UDB_EXTRA_F8_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F8)
36768            }
36769            SERVO_OUTPUT_RAW_DATA::ID => {
36770                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
36771            }
36772            SETUP_SIGNING_DATA::ID => {
36773                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
36774            }
36775            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
36776                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36777                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
36778            }
36779            SET_ATTITUDE_TARGET_DATA::ID => {
36780                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
36781            }
36782            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
36783                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
36784            }
36785            SET_HOME_POSITION_DATA::ID => {
36786                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
36787            }
36788            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
36789            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36790                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36791                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
36792            }
36793            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
36794                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36795                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
36796            }
36797            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
36798            SMART_BATTERY_INFO_DATA::ID => {
36799                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
36800            }
36801            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
36802            STORAGE_INFORMATION_DATA::ID => {
36803                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
36804            }
36805            SUPPORTED_TUNES_DATA::ID => {
36806                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
36807            }
36808            SYSTEM_TIME_DATA::ID => {
36809                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
36810            }
36811            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
36812            TERRAIN_CHECK_DATA::ID => {
36813                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
36814            }
36815            TERRAIN_DATA_DATA::ID => {
36816                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
36817            }
36818            TERRAIN_REPORT_DATA::ID => {
36819                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
36820            }
36821            TERRAIN_REQUEST_DATA::ID => {
36822                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
36823            }
36824            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
36825            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
36826                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
36827                    .map(Self::TIME_ESTIMATE_TO_TARGET)
36828            }
36829            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36830                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
36831                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
36832            }
36833            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36834                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
36835                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
36836            }
36837            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
36838            UAVCAN_NODE_INFO_DATA::ID => {
36839                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
36840            }
36841            UAVCAN_NODE_STATUS_DATA::ID => {
36842                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
36843            }
36844            UTM_GLOBAL_POSITION_DATA::ID => {
36845                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
36846            }
36847            V2_EXTENSION_DATA::ID => {
36848                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
36849            }
36850            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
36851            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
36852            VICON_POSITION_ESTIMATE_DATA::ID => {
36853                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
36854                    .map(Self::VICON_POSITION_ESTIMATE)
36855            }
36856            VIDEO_STREAM_INFORMATION_DATA::ID => {
36857                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
36858                    .map(Self::VIDEO_STREAM_INFORMATION)
36859            }
36860            VIDEO_STREAM_STATUS_DATA::ID => {
36861                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
36862            }
36863            VISION_POSITION_ESTIMATE_DATA::ID => {
36864                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36865                    .map(Self::VISION_POSITION_ESTIMATE)
36866            }
36867            VISION_SPEED_ESTIMATE_DATA::ID => {
36868                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
36869            }
36870            WHEEL_DISTANCE_DATA::ID => {
36871                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
36872            }
36873            WIFI_CONFIG_AP_DATA::ID => {
36874                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
36875            }
36876            WINCH_STATUS_DATA::ID => {
36877                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
36878            }
36879            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
36880            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
36881        }
36882    }
36883    fn message_name(&self) -> &'static str {
36884        match self {
36885            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
36886            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36887            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
36888            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::NAME,
36889            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
36890            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
36891            Self::ALTITUDES(..) => ALTITUDES_DATA::NAME,
36892            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
36893            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
36894            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
36895            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
36896            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
36897            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
36898            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36899                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
36900            }
36901            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
36902            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
36903            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
36904            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
36905            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
36906            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
36907            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
36908            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
36909            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
36910            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
36911            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
36912            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
36913            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36914            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36915            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
36916            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
36917            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
36918            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
36919            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
36920            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
36921            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
36922            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
36923            Self::COLLISION(..) => COLLISION_DATA::NAME,
36924            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
36925            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
36926            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
36927            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
36928            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
36929            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
36930            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
36931            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
36932            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36933            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36934            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36935            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36936            Self::DEBUG(..) => DEBUG_DATA::NAME,
36937            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36938            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36939            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36940            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36941            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36942            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36943            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36944            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36945            Self::EVENT(..) => EVENT_DATA::NAME,
36946            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36947            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36948            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36949            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME,
36950            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
36951                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME
36952            }
36953            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::NAME,
36954            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::NAME,
36955            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::NAME,
36956            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME,
36957            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::NAME,
36958            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::NAME,
36959            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36960            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36961            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36962            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36963            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36964            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36965            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36966            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36967            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36968            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36969                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36970            }
36971            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36972            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36973            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36974            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36975            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36976            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36977            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36978            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36979            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36980            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36981            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36982            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36983            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36984            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36985            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36986            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36987            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36988            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36989            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36990            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36991            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36992            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36993            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36994            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36995            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36996            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36997            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36998            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36999            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
37000            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
37001            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
37002            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
37003            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
37004            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
37005            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37006                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
37007            }
37008            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
37009            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
37010            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
37011            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
37012            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
37013            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
37014            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
37015            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
37016            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
37017            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
37018            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
37019            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
37020            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
37021            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
37022            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
37023            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
37024            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
37025            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
37026            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
37027            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
37028            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
37029            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
37030            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
37031            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
37032            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
37033            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
37034            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
37035            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
37036            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
37037            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
37038            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
37039            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
37040            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
37041            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
37042            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
37043            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
37044            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
37045            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
37046            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
37047            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
37048            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
37049            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
37050            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
37051            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
37052            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
37053            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
37054            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
37055            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
37056            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
37057            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
37058            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
37059            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
37060            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
37061            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
37062            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
37063            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
37064            Self::PING(..) => PING_DATA::NAME,
37065            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
37066            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
37067            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37068            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
37069            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
37070            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
37071            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
37072            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
37073            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
37074            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
37075            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
37076            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
37077            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
37078            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
37079            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
37080            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
37081            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
37082            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
37083            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
37084            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
37085            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
37086            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
37087            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
37088            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
37089            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
37090            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
37091            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
37092            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::NAME,
37093            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::NAME,
37094            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::NAME,
37095            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::NAME,
37096            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::NAME,
37097            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::NAME,
37098            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::NAME,
37099            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::NAME,
37100            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::NAME,
37101            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::NAME,
37102            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::NAME,
37103            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::NAME,
37104            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::NAME,
37105            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::NAME,
37106            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::NAME,
37107            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::NAME,
37108            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::NAME,
37109            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
37110            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
37111            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
37112            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
37113            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
37114            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
37115            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
37116            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37117            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
37118            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
37119            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
37120            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
37121            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
37122            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
37123            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
37124            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
37125            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
37126            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
37127            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
37128            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
37129            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
37130            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
37131            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
37132                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
37133            }
37134            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
37135                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
37136            }
37137            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
37138            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
37139            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
37140            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
37141            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
37142            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
37143            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
37144            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
37145            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
37146            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
37147            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
37148            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
37149            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
37150            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
37151            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
37152            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
37153        }
37154    }
37155    fn message_id(&self) -> u32 {
37156        match self {
37157            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
37158            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
37159            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
37160            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::ID,
37161            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
37162            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
37163            Self::ALTITUDES(..) => ALTITUDES_DATA::ID,
37164            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
37165            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
37166            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
37167            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
37168            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
37169            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
37170            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
37171                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
37172            }
37173            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
37174            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
37175            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
37176            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
37177            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
37178            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
37179            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
37180            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
37181            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
37182            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
37183            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
37184            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
37185            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
37186            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
37187            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
37188            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
37189            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
37190            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
37191            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
37192            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
37193            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
37194            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
37195            Self::COLLISION(..) => COLLISION_DATA::ID,
37196            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
37197            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
37198            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
37199            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
37200            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
37201            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
37202            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
37203            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
37204            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
37205            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
37206            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
37207            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
37208            Self::DEBUG(..) => DEBUG_DATA::ID,
37209            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
37210            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
37211            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
37212            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
37213            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
37214            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
37215            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
37216            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
37217            Self::EVENT(..) => EVENT_DATA::ID,
37218            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
37219            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
37220            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
37221            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID,
37222            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
37223                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID
37224            }
37225            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::ID,
37226            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::ID,
37227            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::ID,
37228            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID,
37229            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::ID,
37230            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::ID,
37231            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
37232            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
37233            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
37234            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
37235            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
37236            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
37237            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
37238            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
37239            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
37240            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
37241                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
37242            }
37243            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
37244            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
37245            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
37246            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
37247            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
37248            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
37249            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
37250            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
37251            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
37252            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
37253            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
37254            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
37255            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
37256            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
37257            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
37258            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
37259            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
37260            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
37261            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
37262            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
37263            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
37264            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
37265            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
37266            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
37267            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
37268            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
37269            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
37270            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
37271            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
37272            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
37273            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
37274            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
37275            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
37276            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
37277            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37278                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
37279            }
37280            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
37281            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
37282            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
37283            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
37284            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
37285            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
37286            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
37287            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
37288            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
37289            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
37290            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
37291            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
37292            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
37293            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
37294            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
37295            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
37296            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
37297            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
37298            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
37299            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
37300            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
37301            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
37302            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
37303            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
37304            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
37305            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
37306            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
37307            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
37308            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
37309            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
37310            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
37311            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
37312            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
37313            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
37314            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
37315            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
37316            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
37317            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
37318            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
37319            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
37320            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
37321            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
37322            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
37323            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
37324            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
37325            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
37326            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
37327            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
37328            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
37329            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
37330            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
37331            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
37332            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
37333            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
37334            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
37335            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
37336            Self::PING(..) => PING_DATA::ID,
37337            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
37338            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
37339            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
37340            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
37341            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
37342            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
37343            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
37344            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
37345            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
37346            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
37347            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
37348            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
37349            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
37350            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
37351            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
37352            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
37353            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
37354            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
37355            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
37356            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
37357            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
37358            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
37359            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
37360            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
37361            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
37362            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
37363            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
37364            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::ID,
37365            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::ID,
37366            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::ID,
37367            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::ID,
37368            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::ID,
37369            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::ID,
37370            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::ID,
37371            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::ID,
37372            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::ID,
37373            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::ID,
37374            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::ID,
37375            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::ID,
37376            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::ID,
37377            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::ID,
37378            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::ID,
37379            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::ID,
37380            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::ID,
37381            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
37382            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
37383            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
37384            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
37385            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
37386            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
37387            Self::SET_MODE(..) => SET_MODE_DATA::ID,
37388            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
37389            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
37390            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
37391            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
37392            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
37393            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
37394            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
37395            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
37396            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
37397            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
37398            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
37399            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
37400            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
37401            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
37402            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
37403            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
37404            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
37405                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
37406            }
37407            Self::TUNNEL(..) => TUNNEL_DATA::ID,
37408            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
37409            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
37410            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
37411            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
37412            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
37413            Self::VIBRATION(..) => VIBRATION_DATA::ID,
37414            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
37415            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
37416            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
37417            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
37418            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
37419            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
37420            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
37421            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
37422            Self::WIND_COV(..) => WIND_COV_DATA::ID,
37423        }
37424    }
37425    fn message_id_from_name(name: &str) -> Option<u32> {
37426        match name {
37427            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
37428            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
37429            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
37430            AIRSPEEDS_DATA::NAME => Some(AIRSPEEDS_DATA::ID),
37431            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
37432            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
37433            ALTITUDES_DATA::NAME => Some(ALTITUDES_DATA::ID),
37434            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
37435            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
37436            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
37437            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
37438            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
37439            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
37440            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
37441                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
37442            }
37443            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
37444            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
37445            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
37446            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
37447            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
37448            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
37449            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
37450            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
37451            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
37452            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
37453            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
37454            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
37455            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
37456            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
37457            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
37458            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
37459            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
37460            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
37461            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
37462            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
37463            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
37464            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
37465            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
37466            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
37467            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
37468            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
37469            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
37470            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
37471            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
37472            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
37473            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
37474            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
37475            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
37476            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
37477            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
37478            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
37479            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
37480            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
37481            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
37482            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
37483            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
37484            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
37485            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
37486            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
37487            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
37488            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
37489            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
37490            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
37491            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME => {
37492                Some(FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID)
37493            }
37494            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME => {
37495                Some(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID)
37496            }
37497            FLEXIFUNCTION_COMMAND_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_DATA::ID),
37498            FLEXIFUNCTION_COMMAND_ACK_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_ACK_DATA::ID),
37499            FLEXIFUNCTION_DIRECTORY_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_DATA::ID),
37500            FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID),
37501            FLEXIFUNCTION_READ_REQ_DATA::NAME => Some(FLEXIFUNCTION_READ_REQ_DATA::ID),
37502            FLEXIFUNCTION_SET_DATA::NAME => Some(FLEXIFUNCTION_SET_DATA::ID),
37503            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
37504            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
37505            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
37506            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
37507            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
37508                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
37509            }
37510            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
37511            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
37512            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
37513            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
37514            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
37515                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
37516            }
37517            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
37518            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
37519            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
37520            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
37521            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
37522                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
37523            }
37524            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
37525            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
37526            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
37527            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
37528            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
37529            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
37530            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
37531            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
37532            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
37533            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
37534            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
37535            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
37536            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
37537            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
37538            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
37539            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
37540            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
37541            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
37542            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
37543            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
37544            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
37545            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
37546            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
37547            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
37548            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
37549            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
37550            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
37551            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
37552            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
37553            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
37554                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
37555            }
37556            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
37557            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
37558            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
37559            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
37560            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
37561            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
37562            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
37563            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
37564            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
37565            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
37566            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
37567            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
37568            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
37569            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
37570            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
37571            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
37572            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
37573            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
37574            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
37575            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
37576            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
37577            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
37578            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
37579            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
37580            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
37581            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
37582            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
37583            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
37584            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
37585            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
37586            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
37587            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
37588            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
37589            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
37590            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
37591            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
37592            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
37593            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
37594            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
37595            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
37596            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
37597            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
37598            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
37599            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
37600            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
37601            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
37602            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
37603            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
37604            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
37605            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
37606            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
37607            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
37608            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
37609            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
37610            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
37611            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
37612            PING_DATA::NAME => Some(PING_DATA::ID),
37613            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
37614            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
37615            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
37616            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
37617            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
37618            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
37619            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
37620            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
37621            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
37622            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
37623            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
37624            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
37625            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
37626            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
37627            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
37628            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
37629            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
37630            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
37631            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
37632            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
37633            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
37634            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
37635            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
37636            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
37637            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
37638            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
37639            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
37640            SERIAL_UDB_EXTRA_F13_DATA::NAME => Some(SERIAL_UDB_EXTRA_F13_DATA::ID),
37641            SERIAL_UDB_EXTRA_F14_DATA::NAME => Some(SERIAL_UDB_EXTRA_F14_DATA::ID),
37642            SERIAL_UDB_EXTRA_F15_DATA::NAME => Some(SERIAL_UDB_EXTRA_F15_DATA::ID),
37643            SERIAL_UDB_EXTRA_F16_DATA::NAME => Some(SERIAL_UDB_EXTRA_F16_DATA::ID),
37644            SERIAL_UDB_EXTRA_F17_DATA::NAME => Some(SERIAL_UDB_EXTRA_F17_DATA::ID),
37645            SERIAL_UDB_EXTRA_F18_DATA::NAME => Some(SERIAL_UDB_EXTRA_F18_DATA::ID),
37646            SERIAL_UDB_EXTRA_F19_DATA::NAME => Some(SERIAL_UDB_EXTRA_F19_DATA::ID),
37647            SERIAL_UDB_EXTRA_F20_DATA::NAME => Some(SERIAL_UDB_EXTRA_F20_DATA::ID),
37648            SERIAL_UDB_EXTRA_F21_DATA::NAME => Some(SERIAL_UDB_EXTRA_F21_DATA::ID),
37649            SERIAL_UDB_EXTRA_F22_DATA::NAME => Some(SERIAL_UDB_EXTRA_F22_DATA::ID),
37650            SERIAL_UDB_EXTRA_F2_A_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_A_DATA::ID),
37651            SERIAL_UDB_EXTRA_F2_B_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_B_DATA::ID),
37652            SERIAL_UDB_EXTRA_F4_DATA::NAME => Some(SERIAL_UDB_EXTRA_F4_DATA::ID),
37653            SERIAL_UDB_EXTRA_F5_DATA::NAME => Some(SERIAL_UDB_EXTRA_F5_DATA::ID),
37654            SERIAL_UDB_EXTRA_F6_DATA::NAME => Some(SERIAL_UDB_EXTRA_F6_DATA::ID),
37655            SERIAL_UDB_EXTRA_F7_DATA::NAME => Some(SERIAL_UDB_EXTRA_F7_DATA::ID),
37656            SERIAL_UDB_EXTRA_F8_DATA::NAME => Some(SERIAL_UDB_EXTRA_F8_DATA::ID),
37657            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
37658            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
37659            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
37660            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
37661            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
37662            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
37663            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
37664            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
37665                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
37666            }
37667            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
37668                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
37669            }
37670            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
37671            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
37672            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
37673            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
37674            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
37675            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
37676            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
37677            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
37678            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
37679            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
37680            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
37681            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
37682            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
37683            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
37684                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
37685            }
37686            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
37687                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
37688            }
37689            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
37690            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
37691            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
37692            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
37693            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
37694            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
37695            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
37696            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
37697            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
37698            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
37699            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
37700            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
37701            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
37702            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
37703            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
37704            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
37705            _ => None,
37706        }
37707    }
37708    fn default_message_from_id(id: u32) -> Option<Self> {
37709        match id {
37710            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37711                ACTUATOR_CONTROL_TARGET_DATA::default(),
37712            )),
37713            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37714                ACTUATOR_OUTPUT_STATUS_DATA::default(),
37715            )),
37716            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
37717            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::default())),
37718            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
37719            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
37720            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::default())),
37721            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
37722            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37723                ATTITUDE_QUATERNION_DATA::default(),
37724            )),
37725            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37726                ATTITUDE_QUATERNION_COV_DATA::default(),
37727            )),
37728            ATTITUDE_TARGET_DATA::ID => {
37729                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
37730            }
37731            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
37732            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
37733            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37734                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37735                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
37736                ))
37737            }
37738            AUTOPILOT_VERSION_DATA::ID => {
37739                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
37740            }
37741            AVAILABLE_MODES_DATA::ID => {
37742                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
37743            }
37744            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37745                AVAILABLE_MODES_MONITOR_DATA::default(),
37746            )),
37747            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
37748            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
37749            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
37750            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37751                CAMERA_CAPTURE_STATUS_DATA::default(),
37752            )),
37753            CAMERA_FOV_STATUS_DATA::ID => {
37754                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
37755            }
37756            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37757                CAMERA_IMAGE_CAPTURED_DATA::default(),
37758            )),
37759            CAMERA_INFORMATION_DATA::ID => {
37760                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
37761            }
37762            CAMERA_SETTINGS_DATA::ID => {
37763                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
37764            }
37765            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37766                CAMERA_THERMAL_RANGE_DATA::default(),
37767            )),
37768            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37769                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
37770            )),
37771            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37772                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
37773            )),
37774            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
37775            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
37776            CAN_FILTER_MODIFY_DATA::ID => {
37777                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
37778            }
37779            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
37780            CELLULAR_CONFIG_DATA::ID => {
37781                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
37782            }
37783            CELLULAR_STATUS_DATA::ID => {
37784                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
37785            }
37786            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37787                CHANGE_OPERATOR_CONTROL_DATA::default(),
37788            )),
37789            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37790                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
37791            )),
37792            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
37793            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
37794            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
37795            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
37796            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
37797            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37798                COMPONENT_INFORMATION_DATA::default(),
37799            )),
37800            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37801                COMPONENT_INFORMATION_BASIC_DATA::default(),
37802            )),
37803            COMPONENT_METADATA_DATA::ID => {
37804                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
37805            }
37806            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37807                CONTROL_SYSTEM_STATE_DATA::default(),
37808            )),
37809            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37810                CURRENT_EVENT_SEQUENCE_DATA::default(),
37811            )),
37812            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
37813            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
37814            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37815                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
37816            )),
37817            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
37818            DEBUG_FLOAT_ARRAY_DATA::ID => {
37819                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
37820            }
37821            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
37822            DISTANCE_SENSOR_DATA::ID => {
37823                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
37824            }
37825            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
37826            ENCAPSULATED_DATA_DATA::ID => {
37827                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
37828            }
37829            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
37830            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
37831            ESTIMATOR_STATUS_DATA::ID => {
37832                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
37833            }
37834            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
37835            EXTENDED_SYS_STATE_DATA::ID => {
37836                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
37837            }
37838            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
37839            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37840                FILE_TRANSFER_PROTOCOL_DATA::default(),
37841            )),
37842            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
37843                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::default(),
37844            )),
37845            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
37846                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
37847                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::default(),
37848                ))
37849            }
37850            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
37851                FLEXIFUNCTION_COMMAND_DATA::default(),
37852            )),
37853            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
37854                FLEXIFUNCTION_COMMAND_ACK_DATA::default(),
37855            )),
37856            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
37857                FLEXIFUNCTION_DIRECTORY_DATA::default(),
37858            )),
37859            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
37860                FLEXIFUNCTION_DIRECTORY_ACK_DATA::default(),
37861            )),
37862            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
37863                FLEXIFUNCTION_READ_REQ_DATA::default(),
37864            )),
37865            FLEXIFUNCTION_SET_DATA::ID => {
37866                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::default()))
37867            }
37868            FLIGHT_INFORMATION_DATA::ID => {
37869                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
37870            }
37871            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
37872            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
37873            GENERATOR_STATUS_DATA::ID => {
37874                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
37875            }
37876            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37877                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
37878            )),
37879            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37880                GIMBAL_DEVICE_INFORMATION_DATA::default(),
37881            )),
37882            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37883                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
37884            )),
37885            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37886                GIMBAL_MANAGER_INFORMATION_DATA::default(),
37887            )),
37888            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37889                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
37890            )),
37891            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37892                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37893                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
37894                ))
37895            }
37896            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37897                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
37898            )),
37899            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37900                GIMBAL_MANAGER_STATUS_DATA::default(),
37901            )),
37902            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37903                GLOBAL_POSITION_INT_DATA::default(),
37904            )),
37905            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37906                GLOBAL_POSITION_INT_COV_DATA::default(),
37907            )),
37908            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37909                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37910                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
37911                ))
37912            }
37913            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
37914            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
37915            GPS_GLOBAL_ORIGIN_DATA::ID => {
37916                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
37917            }
37918            GPS_INJECT_DATA_DATA::ID => {
37919                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
37920            }
37921            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
37922            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
37923            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
37924            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
37925            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
37926            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
37927            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
37928            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
37929            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
37930            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37931                HIL_ACTUATOR_CONTROLS_DATA::default(),
37932            )),
37933            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
37934            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
37935            HIL_OPTICAL_FLOW_DATA::ID => {
37936                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
37937            }
37938            HIL_RC_INPUTS_RAW_DATA::ID => {
37939                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
37940            }
37941            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
37942            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
37943            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37944                HIL_STATE_QUATERNION_DATA::default(),
37945            )),
37946            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
37947            HYGROMETER_SENSOR_DATA::ID => {
37948                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
37949            }
37950            ILLUMINATOR_STATUS_DATA::ID => {
37951                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
37952            }
37953            ISBD_LINK_STATUS_DATA::ID => {
37954                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
37955            }
37956            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
37957            LINK_NODE_STATUS_DATA::ID => {
37958                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
37959            }
37960            LOCAL_POSITION_NED_DATA::ID => {
37961                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
37962            }
37963            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37964                LOCAL_POSITION_NED_COV_DATA::default(),
37965            )),
37966            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37967                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37968                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
37969                ))
37970            }
37971            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
37972            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
37973            LOGGING_DATA_ACKED_DATA::ID => {
37974                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
37975            }
37976            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
37977            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
37978            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
37979            LOG_REQUEST_DATA_DATA::ID => {
37980                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
37981            }
37982            LOG_REQUEST_END_DATA::ID => {
37983                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
37984            }
37985            LOG_REQUEST_LIST_DATA::ID => {
37986                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37987            }
37988            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37989            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37990            MANUAL_SETPOINT_DATA::ID => {
37991                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37992            }
37993            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37994            MESSAGE_INTERVAL_DATA::ID => {
37995                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37996            }
37997            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37998            MISSION_CLEAR_ALL_DATA::ID => {
37999                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
38000            }
38001            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
38002            MISSION_CURRENT_DATA::ID => {
38003                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
38004            }
38005            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
38006            MISSION_ITEM_INT_DATA::ID => {
38007                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
38008            }
38009            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38010                MISSION_ITEM_REACHED_DATA::default(),
38011            )),
38012            MISSION_REQUEST_DATA::ID => {
38013                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
38014            }
38015            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38016                MISSION_REQUEST_INT_DATA::default(),
38017            )),
38018            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38019                MISSION_REQUEST_LIST_DATA::default(),
38020            )),
38021            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38022                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
38023            )),
38024            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38025                MISSION_SET_CURRENT_DATA::default(),
38026            )),
38027            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38028                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
38029            )),
38030            MOUNT_ORIENTATION_DATA::ID => {
38031                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
38032            }
38033            NAMED_VALUE_FLOAT_DATA::ID => {
38034                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
38035            }
38036            NAMED_VALUE_INT_DATA::ID => {
38037                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
38038            }
38039            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38040                NAV_CONTROLLER_OUTPUT_DATA::default(),
38041            )),
38042            OBSTACLE_DISTANCE_DATA::ID => {
38043                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
38044            }
38045            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
38046            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38047                ONBOARD_COMPUTER_STATUS_DATA::default(),
38048            )),
38049            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38050                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
38051            )),
38052            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38053                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
38054            )),
38055            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38056                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
38057            )),
38058            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38059                OPEN_DRONE_ID_LOCATION_DATA::default(),
38060            )),
38061            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38062                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
38063            )),
38064            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38065                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
38066            )),
38067            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38068                OPEN_DRONE_ID_SELF_ID_DATA::default(),
38069            )),
38070            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38071                OPEN_DRONE_ID_SYSTEM_DATA::default(),
38072            )),
38073            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38074                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
38075            )),
38076            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
38077            OPTICAL_FLOW_RAD_DATA::ID => {
38078                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
38079            }
38080            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38081                ORBIT_EXECUTION_STATUS_DATA::default(),
38082            )),
38083            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
38084            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38085                PARAM_EXT_REQUEST_LIST_DATA::default(),
38086            )),
38087            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38088                PARAM_EXT_REQUEST_READ_DATA::default(),
38089            )),
38090            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
38091            PARAM_EXT_VALUE_DATA::ID => {
38092                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
38093            }
38094            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
38095            PARAM_REQUEST_LIST_DATA::ID => {
38096                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
38097            }
38098            PARAM_REQUEST_READ_DATA::ID => {
38099                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
38100            }
38101            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
38102            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
38103            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
38104            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
38105            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
38106            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38107                POSITION_TARGET_GLOBAL_INT_DATA::default(),
38108            )),
38109            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38110                POSITION_TARGET_LOCAL_NED_DATA::default(),
38111            )),
38112            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
38113            PROTOCOL_VERSION_DATA::ID => {
38114                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
38115            }
38116            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
38117            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
38118            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
38119            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
38120            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
38121            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38122                RC_CHANNELS_OVERRIDE_DATA::default(),
38123            )),
38124            RC_CHANNELS_RAW_DATA::ID => {
38125                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
38126            }
38127            RC_CHANNELS_SCALED_DATA::ID => {
38128                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
38129            }
38130            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38131                REQUEST_DATA_STREAM_DATA::default(),
38132            )),
38133            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
38134            RESOURCE_REQUEST_DATA::ID => {
38135                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
38136            }
38137            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38138                RESPONSE_EVENT_ERROR_DATA::default(),
38139            )),
38140            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38141                SAFETY_ALLOWED_AREA_DATA::default(),
38142            )),
38143            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38144                SAFETY_SET_ALLOWED_AREA_DATA::default(),
38145            )),
38146            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
38147            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
38148            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
38149            SCALED_PRESSURE_DATA::ID => {
38150                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
38151            }
38152            SCALED_PRESSURE2_DATA::ID => {
38153                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
38154            }
38155            SCALED_PRESSURE3_DATA::ID => {
38156                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
38157            }
38158            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
38159            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
38160                SERIAL_UDB_EXTRA_F13_DATA::default(),
38161            )),
38162            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
38163                SERIAL_UDB_EXTRA_F14_DATA::default(),
38164            )),
38165            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
38166                SERIAL_UDB_EXTRA_F15_DATA::default(),
38167            )),
38168            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
38169                SERIAL_UDB_EXTRA_F16_DATA::default(),
38170            )),
38171            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
38172                SERIAL_UDB_EXTRA_F17_DATA::default(),
38173            )),
38174            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
38175                SERIAL_UDB_EXTRA_F18_DATA::default(),
38176            )),
38177            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
38178                SERIAL_UDB_EXTRA_F19_DATA::default(),
38179            )),
38180            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
38181                SERIAL_UDB_EXTRA_F20_DATA::default(),
38182            )),
38183            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
38184                SERIAL_UDB_EXTRA_F21_DATA::default(),
38185            )),
38186            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
38187                SERIAL_UDB_EXTRA_F22_DATA::default(),
38188            )),
38189            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
38190                SERIAL_UDB_EXTRA_F2_A_DATA::default(),
38191            )),
38192            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
38193                SERIAL_UDB_EXTRA_F2_B_DATA::default(),
38194            )),
38195            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
38196                SERIAL_UDB_EXTRA_F4_DATA::default(),
38197            )),
38198            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
38199                SERIAL_UDB_EXTRA_F5_DATA::default(),
38200            )),
38201            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
38202                SERIAL_UDB_EXTRA_F6_DATA::default(),
38203            )),
38204            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
38205                SERIAL_UDB_EXTRA_F7_DATA::default(),
38206            )),
38207            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
38208                SERIAL_UDB_EXTRA_F8_DATA::default(),
38209            )),
38210            SERVO_OUTPUT_RAW_DATA::ID => {
38211                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
38212            }
38213            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
38214            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38215                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
38216            )),
38217            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38218                SET_ATTITUDE_TARGET_DATA::default(),
38219            )),
38220            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38221                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
38222            )),
38223            SET_HOME_POSITION_DATA::ID => {
38224                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
38225            }
38226            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
38227            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38228                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
38229            )),
38230            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38231                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
38232            )),
38233            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
38234            SMART_BATTERY_INFO_DATA::ID => {
38235                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
38236            }
38237            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
38238            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38239                STORAGE_INFORMATION_DATA::default(),
38240            )),
38241            SUPPORTED_TUNES_DATA::ID => {
38242                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
38243            }
38244            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
38245            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
38246            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
38247            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
38248            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
38249            TERRAIN_REQUEST_DATA::ID => {
38250                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
38251            }
38252            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
38253            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38254                TIME_ESTIMATE_TO_TARGET_DATA::default(),
38255            )),
38256            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38257                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38258                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
38259                ))
38260            }
38261            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38262                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38263                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
38264                ))
38265            }
38266            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
38267            UAVCAN_NODE_INFO_DATA::ID => {
38268                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
38269            }
38270            UAVCAN_NODE_STATUS_DATA::ID => {
38271                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
38272            }
38273            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38274                UTM_GLOBAL_POSITION_DATA::default(),
38275            )),
38276            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
38277            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
38278            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
38279            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38280                VICON_POSITION_ESTIMATE_DATA::default(),
38281            )),
38282            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38283                VIDEO_STREAM_INFORMATION_DATA::default(),
38284            )),
38285            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38286                VIDEO_STREAM_STATUS_DATA::default(),
38287            )),
38288            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38289                VISION_POSITION_ESTIMATE_DATA::default(),
38290            )),
38291            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38292                VISION_SPEED_ESTIMATE_DATA::default(),
38293            )),
38294            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
38295            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
38296            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
38297            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
38298            _ => None,
38299        }
38300    }
38301    #[cfg(feature = "arbitrary")]
38302    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
38303        match id {
38304            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
38305                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38306            )),
38307            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
38308                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
38309            )),
38310            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
38311            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::random(rng))),
38312            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
38313            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
38314            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::random(rng))),
38315            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
38316            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
38317                ATTITUDE_QUATERNION_DATA::random(rng),
38318            )),
38319            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
38320                ATTITUDE_QUATERNION_COV_DATA::random(rng),
38321            )),
38322            ATTITUDE_TARGET_DATA::ID => {
38323                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
38324            }
38325            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
38326            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
38327            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38328                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
38329                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
38330                ))
38331            }
38332            AUTOPILOT_VERSION_DATA::ID => {
38333                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
38334            }
38335            AVAILABLE_MODES_DATA::ID => {
38336                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
38337            }
38338            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
38339                AVAILABLE_MODES_MONITOR_DATA::random(rng),
38340            )),
38341            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
38342            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
38343            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
38344            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
38345                CAMERA_CAPTURE_STATUS_DATA::random(rng),
38346            )),
38347            CAMERA_FOV_STATUS_DATA::ID => {
38348                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
38349            }
38350            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
38351                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
38352            )),
38353            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
38354                CAMERA_INFORMATION_DATA::random(rng),
38355            )),
38356            CAMERA_SETTINGS_DATA::ID => {
38357                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
38358            }
38359            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
38360                CAMERA_THERMAL_RANGE_DATA::random(rng),
38361            )),
38362            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
38363                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
38364            )),
38365            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
38366                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
38367            )),
38368            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
38369            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
38370            CAN_FILTER_MODIFY_DATA::ID => {
38371                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
38372            }
38373            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
38374            CELLULAR_CONFIG_DATA::ID => {
38375                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
38376            }
38377            CELLULAR_STATUS_DATA::ID => {
38378                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
38379            }
38380            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
38381                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
38382            )),
38383            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
38384                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
38385            )),
38386            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
38387            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
38388            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
38389            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
38390            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
38391            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
38392                COMPONENT_INFORMATION_DATA::random(rng),
38393            )),
38394            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
38395                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
38396            )),
38397            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
38398                COMPONENT_METADATA_DATA::random(rng),
38399            )),
38400            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
38401                CONTROL_SYSTEM_STATE_DATA::random(rng),
38402            )),
38403            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
38404                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
38405            )),
38406            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
38407            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
38408            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
38409                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
38410            )),
38411            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
38412            DEBUG_FLOAT_ARRAY_DATA::ID => {
38413                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
38414            }
38415            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
38416            DISTANCE_SENSOR_DATA::ID => {
38417                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
38418            }
38419            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
38420            ENCAPSULATED_DATA_DATA::ID => {
38421                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
38422            }
38423            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
38424            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
38425            ESTIMATOR_STATUS_DATA::ID => {
38426                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
38427            }
38428            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
38429            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
38430                EXTENDED_SYS_STATE_DATA::random(rng),
38431            )),
38432            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
38433            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
38434                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
38435            )),
38436            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
38437                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::random(rng),
38438            )),
38439            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
38440                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
38441                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::random(rng),
38442                ))
38443            }
38444            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
38445                FLEXIFUNCTION_COMMAND_DATA::random(rng),
38446            )),
38447            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
38448                FLEXIFUNCTION_COMMAND_ACK_DATA::random(rng),
38449            )),
38450            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
38451                FLEXIFUNCTION_DIRECTORY_DATA::random(rng),
38452            )),
38453            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
38454                FLEXIFUNCTION_DIRECTORY_ACK_DATA::random(rng),
38455            )),
38456            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
38457                FLEXIFUNCTION_READ_REQ_DATA::random(rng),
38458            )),
38459            FLEXIFUNCTION_SET_DATA::ID => {
38460                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::random(rng)))
38461            }
38462            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
38463                FLIGHT_INFORMATION_DATA::random(rng),
38464            )),
38465            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
38466            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
38467            GENERATOR_STATUS_DATA::ID => {
38468                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
38469            }
38470            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
38471                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
38472            )),
38473            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
38474                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
38475            )),
38476            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
38477                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
38478            )),
38479            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
38480                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
38481            )),
38482            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
38483                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
38484            )),
38485            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38486                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
38487                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
38488                ))
38489            }
38490            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
38491                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
38492            )),
38493            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
38494                GIMBAL_MANAGER_STATUS_DATA::random(rng),
38495            )),
38496            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
38497                GLOBAL_POSITION_INT_DATA::random(rng),
38498            )),
38499            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
38500                GLOBAL_POSITION_INT_COV_DATA::random(rng),
38501            )),
38502            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38503                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
38504                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
38505                ))
38506            }
38507            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
38508            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
38509            GPS_GLOBAL_ORIGIN_DATA::ID => {
38510                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
38511            }
38512            GPS_INJECT_DATA_DATA::ID => {
38513                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
38514            }
38515            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
38516            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
38517            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
38518            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
38519            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
38520            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
38521            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
38522            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
38523            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
38524            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
38525                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
38526            )),
38527            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
38528            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
38529            HIL_OPTICAL_FLOW_DATA::ID => {
38530                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
38531            }
38532            HIL_RC_INPUTS_RAW_DATA::ID => {
38533                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
38534            }
38535            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
38536            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
38537            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
38538                HIL_STATE_QUATERNION_DATA::random(rng),
38539            )),
38540            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
38541            HYGROMETER_SENSOR_DATA::ID => {
38542                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
38543            }
38544            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
38545                ILLUMINATOR_STATUS_DATA::random(rng),
38546            )),
38547            ISBD_LINK_STATUS_DATA::ID => {
38548                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
38549            }
38550            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
38551            LINK_NODE_STATUS_DATA::ID => {
38552                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
38553            }
38554            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
38555                LOCAL_POSITION_NED_DATA::random(rng),
38556            )),
38557            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
38558                LOCAL_POSITION_NED_COV_DATA::random(rng),
38559            )),
38560            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38561                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
38562                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
38563                ))
38564            }
38565            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
38566            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
38567            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
38568                LOGGING_DATA_ACKED_DATA::random(rng),
38569            )),
38570            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
38571            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
38572            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
38573            LOG_REQUEST_DATA_DATA::ID => {
38574                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
38575            }
38576            LOG_REQUEST_END_DATA::ID => {
38577                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
38578            }
38579            LOG_REQUEST_LIST_DATA::ID => {
38580                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
38581            }
38582            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
38583            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
38584            MANUAL_SETPOINT_DATA::ID => {
38585                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
38586            }
38587            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
38588            MESSAGE_INTERVAL_DATA::ID => {
38589                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
38590            }
38591            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
38592            MISSION_CLEAR_ALL_DATA::ID => {
38593                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
38594            }
38595            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
38596            MISSION_CURRENT_DATA::ID => {
38597                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
38598            }
38599            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
38600            MISSION_ITEM_INT_DATA::ID => {
38601                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
38602            }
38603            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38604                MISSION_ITEM_REACHED_DATA::random(rng),
38605            )),
38606            MISSION_REQUEST_DATA::ID => {
38607                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
38608            }
38609            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38610                MISSION_REQUEST_INT_DATA::random(rng),
38611            )),
38612            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38613                MISSION_REQUEST_LIST_DATA::random(rng),
38614            )),
38615            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38616                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
38617            )),
38618            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38619                MISSION_SET_CURRENT_DATA::random(rng),
38620            )),
38621            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38622                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
38623            )),
38624            MOUNT_ORIENTATION_DATA::ID => {
38625                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
38626            }
38627            NAMED_VALUE_FLOAT_DATA::ID => {
38628                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
38629            }
38630            NAMED_VALUE_INT_DATA::ID => {
38631                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
38632            }
38633            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38634                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
38635            )),
38636            OBSTACLE_DISTANCE_DATA::ID => {
38637                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
38638            }
38639            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
38640            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38641                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
38642            )),
38643            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38644                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
38645            )),
38646            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38647                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
38648            )),
38649            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38650                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
38651            )),
38652            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38653                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
38654            )),
38655            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38656                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
38657            )),
38658            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38659                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
38660            )),
38661            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38662                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
38663            )),
38664            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38665                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
38666            )),
38667            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38668                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
38669            )),
38670            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
38671            OPTICAL_FLOW_RAD_DATA::ID => {
38672                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
38673            }
38674            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38675                ORBIT_EXECUTION_STATUS_DATA::random(rng),
38676            )),
38677            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
38678            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38679                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
38680            )),
38681            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38682                PARAM_EXT_REQUEST_READ_DATA::random(rng),
38683            )),
38684            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
38685            PARAM_EXT_VALUE_DATA::ID => {
38686                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
38687            }
38688            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
38689            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
38690                PARAM_REQUEST_LIST_DATA::random(rng),
38691            )),
38692            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
38693                PARAM_REQUEST_READ_DATA::random(rng),
38694            )),
38695            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
38696            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
38697            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
38698            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
38699            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
38700            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38701                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38702            )),
38703            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38704                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38705            )),
38706            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
38707            PROTOCOL_VERSION_DATA::ID => {
38708                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
38709            }
38710            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
38711            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
38712            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
38713            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
38714            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
38715            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38716                RC_CHANNELS_OVERRIDE_DATA::random(rng),
38717            )),
38718            RC_CHANNELS_RAW_DATA::ID => {
38719                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
38720            }
38721            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
38722                RC_CHANNELS_SCALED_DATA::random(rng),
38723            )),
38724            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38725                REQUEST_DATA_STREAM_DATA::random(rng),
38726            )),
38727            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
38728            RESOURCE_REQUEST_DATA::ID => {
38729                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
38730            }
38731            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38732                RESPONSE_EVENT_ERROR_DATA::random(rng),
38733            )),
38734            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38735                SAFETY_ALLOWED_AREA_DATA::random(rng),
38736            )),
38737            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38738                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
38739            )),
38740            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
38741            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
38742            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
38743            SCALED_PRESSURE_DATA::ID => {
38744                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
38745            }
38746            SCALED_PRESSURE2_DATA::ID => {
38747                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
38748            }
38749            SCALED_PRESSURE3_DATA::ID => {
38750                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
38751            }
38752            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
38753            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
38754                SERIAL_UDB_EXTRA_F13_DATA::random(rng),
38755            )),
38756            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
38757                SERIAL_UDB_EXTRA_F14_DATA::random(rng),
38758            )),
38759            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
38760                SERIAL_UDB_EXTRA_F15_DATA::random(rng),
38761            )),
38762            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
38763                SERIAL_UDB_EXTRA_F16_DATA::random(rng),
38764            )),
38765            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
38766                SERIAL_UDB_EXTRA_F17_DATA::random(rng),
38767            )),
38768            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
38769                SERIAL_UDB_EXTRA_F18_DATA::random(rng),
38770            )),
38771            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
38772                SERIAL_UDB_EXTRA_F19_DATA::random(rng),
38773            )),
38774            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
38775                SERIAL_UDB_EXTRA_F20_DATA::random(rng),
38776            )),
38777            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
38778                SERIAL_UDB_EXTRA_F21_DATA::random(rng),
38779            )),
38780            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
38781                SERIAL_UDB_EXTRA_F22_DATA::random(rng),
38782            )),
38783            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
38784                SERIAL_UDB_EXTRA_F2_A_DATA::random(rng),
38785            )),
38786            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
38787                SERIAL_UDB_EXTRA_F2_B_DATA::random(rng),
38788            )),
38789            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
38790                SERIAL_UDB_EXTRA_F4_DATA::random(rng),
38791            )),
38792            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
38793                SERIAL_UDB_EXTRA_F5_DATA::random(rng),
38794            )),
38795            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
38796                SERIAL_UDB_EXTRA_F6_DATA::random(rng),
38797            )),
38798            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
38799                SERIAL_UDB_EXTRA_F7_DATA::random(rng),
38800            )),
38801            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
38802                SERIAL_UDB_EXTRA_F8_DATA::random(rng),
38803            )),
38804            SERVO_OUTPUT_RAW_DATA::ID => {
38805                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
38806            }
38807            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
38808            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38809                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38810            )),
38811            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38812                SET_ATTITUDE_TARGET_DATA::random(rng),
38813            )),
38814            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38815                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
38816            )),
38817            SET_HOME_POSITION_DATA::ID => {
38818                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
38819            }
38820            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
38821            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38822                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38823            )),
38824            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38825                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38826            )),
38827            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
38828            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
38829                SMART_BATTERY_INFO_DATA::random(rng),
38830            )),
38831            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
38832            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38833                STORAGE_INFORMATION_DATA::random(rng),
38834            )),
38835            SUPPORTED_TUNES_DATA::ID => {
38836                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
38837            }
38838            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
38839            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
38840            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
38841            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
38842            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
38843            TERRAIN_REQUEST_DATA::ID => {
38844                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
38845            }
38846            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
38847            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38848                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
38849            )),
38850            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38851                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38852                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
38853                ))
38854            }
38855            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38856                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38857                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
38858                ))
38859            }
38860            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
38861            UAVCAN_NODE_INFO_DATA::ID => {
38862                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
38863            }
38864            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
38865                UAVCAN_NODE_STATUS_DATA::random(rng),
38866            )),
38867            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38868                UTM_GLOBAL_POSITION_DATA::random(rng),
38869            )),
38870            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
38871            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
38872            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
38873            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38874                VICON_POSITION_ESTIMATE_DATA::random(rng),
38875            )),
38876            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38877                VIDEO_STREAM_INFORMATION_DATA::random(rng),
38878            )),
38879            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38880                VIDEO_STREAM_STATUS_DATA::random(rng),
38881            )),
38882            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38883                VISION_POSITION_ESTIMATE_DATA::random(rng),
38884            )),
38885            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38886                VISION_SPEED_ESTIMATE_DATA::random(rng),
38887            )),
38888            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
38889            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
38890            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
38891            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
38892            _ => None,
38893        }
38894    }
38895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38896        match self {
38897            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38898            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
38899            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
38900            Self::AIRSPEEDS(body) => body.ser(version, bytes),
38901            Self::AIS_VESSEL(body) => body.ser(version, bytes),
38902            Self::ALTITUDE(body) => body.ser(version, bytes),
38903            Self::ALTITUDES(body) => body.ser(version, bytes),
38904            Self::ATTITUDE(body) => body.ser(version, bytes),
38905            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
38906            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
38907            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
38908            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
38909            Self::AUTH_KEY(body) => body.ser(version, bytes),
38910            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
38911            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
38912            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
38913            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
38914            Self::BATTERY_INFO(body) => body.ser(version, bytes),
38915            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
38916            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
38917            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
38918            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
38919            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
38920            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
38921            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
38922            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
38923            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
38924            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
38925            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
38926            Self::CANFD_FRAME(body) => body.ser(version, bytes),
38927            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
38928            Self::CAN_FRAME(body) => body.ser(version, bytes),
38929            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
38930            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
38931            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
38932            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
38933            Self::COLLISION(body) => body.ser(version, bytes),
38934            Self::COMMAND_ACK(body) => body.ser(version, bytes),
38935            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
38936            Self::COMMAND_INT(body) => body.ser(version, bytes),
38937            Self::COMMAND_LONG(body) => body.ser(version, bytes),
38938            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
38939            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
38940            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
38941            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
38942            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
38943            Self::CURRENT_MODE(body) => body.ser(version, bytes),
38944            Self::DATA_STREAM(body) => body.ser(version, bytes),
38945            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
38946            Self::DEBUG(body) => body.ser(version, bytes),
38947            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
38948            Self::DEBUG_VECT(body) => body.ser(version, bytes),
38949            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
38950            Self::EFI_STATUS(body) => body.ser(version, bytes),
38951            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
38952            Self::ESC_INFO(body) => body.ser(version, bytes),
38953            Self::ESC_STATUS(body) => body.ser(version, bytes),
38954            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
38955            Self::EVENT(body) => body.ser(version, bytes),
38956            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
38957            Self::FENCE_STATUS(body) => body.ser(version, bytes),
38958            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
38959            Self::FLEXIFUNCTION_BUFFER_FUNCTION(body) => body.ser(version, bytes),
38960            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(body) => body.ser(version, bytes),
38961            Self::FLEXIFUNCTION_COMMAND(body) => body.ser(version, bytes),
38962            Self::FLEXIFUNCTION_COMMAND_ACK(body) => body.ser(version, bytes),
38963            Self::FLEXIFUNCTION_DIRECTORY(body) => body.ser(version, bytes),
38964            Self::FLEXIFUNCTION_DIRECTORY_ACK(body) => body.ser(version, bytes),
38965            Self::FLEXIFUNCTION_READ_REQ(body) => body.ser(version, bytes),
38966            Self::FLEXIFUNCTION_SET(body) => body.ser(version, bytes),
38967            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
38968            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
38969            Self::FUEL_STATUS(body) => body.ser(version, bytes),
38970            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
38971            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
38972            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
38973            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
38974            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
38975            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
38976            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
38977            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
38978            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
38979            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
38980            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
38981            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38982            Self::GPS2_RAW(body) => body.ser(version, bytes),
38983            Self::GPS2_RTK(body) => body.ser(version, bytes),
38984            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38985            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
38986            Self::GPS_INPUT(body) => body.ser(version, bytes),
38987            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
38988            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
38989            Self::GPS_RTK(body) => body.ser(version, bytes),
38990            Self::GPS_STATUS(body) => body.ser(version, bytes),
38991            Self::HEARTBEAT(body) => body.ser(version, bytes),
38992            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
38993            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
38994            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
38995            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
38996            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
38997            Self::HIL_GPS(body) => body.ser(version, bytes),
38998            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
38999            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
39000            Self::HIL_SENSOR(body) => body.ser(version, bytes),
39001            Self::HIL_STATE(body) => body.ser(version, bytes),
39002            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
39003            Self::HOME_POSITION(body) => body.ser(version, bytes),
39004            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
39005            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
39006            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
39007            Self::LANDING_TARGET(body) => body.ser(version, bytes),
39008            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
39009            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
39010            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
39011            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
39012            Self::LOGGING_ACK(body) => body.ser(version, bytes),
39013            Self::LOGGING_DATA(body) => body.ser(version, bytes),
39014            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
39015            Self::LOG_DATA(body) => body.ser(version, bytes),
39016            Self::LOG_ENTRY(body) => body.ser(version, bytes),
39017            Self::LOG_ERASE(body) => body.ser(version, bytes),
39018            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
39019            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
39020            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
39021            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
39022            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
39023            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
39024            Self::MEMORY_VECT(body) => body.ser(version, bytes),
39025            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
39026            Self::MISSION_ACK(body) => body.ser(version, bytes),
39027            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
39028            Self::MISSION_COUNT(body) => body.ser(version, bytes),
39029            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
39030            Self::MISSION_ITEM(body) => body.ser(version, bytes),
39031            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
39032            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
39033            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
39034            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
39035            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
39036            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
39037            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
39038            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
39039            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
39040            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
39041            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
39042            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
39043            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
39044            Self::ODOMETRY(body) => body.ser(version, bytes),
39045            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
39046            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
39047            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
39048            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
39049            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
39050            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
39051            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
39052            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
39053            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
39054            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
39055            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
39056            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
39057            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
39058            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
39059            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
39060            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
39061            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
39062            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
39063            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
39064            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
39065            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
39066            Self::PARAM_SET(body) => body.ser(version, bytes),
39067            Self::PARAM_VALUE(body) => body.ser(version, bytes),
39068            Self::PING(body) => body.ser(version, bytes),
39069            Self::PLAY_TUNE(body) => body.ser(version, bytes),
39070            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
39071            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
39072            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
39073            Self::POWER_STATUS(body) => body.ser(version, bytes),
39074            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
39075            Self::RADIO_STATUS(body) => body.ser(version, bytes),
39076            Self::RAW_IMU(body) => body.ser(version, bytes),
39077            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
39078            Self::RAW_RPM(body) => body.ser(version, bytes),
39079            Self::RC_CHANNELS(body) => body.ser(version, bytes),
39080            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
39081            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
39082            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
39083            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
39084            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
39085            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
39086            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
39087            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
39088            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
39089            Self::SCALED_IMU(body) => body.ser(version, bytes),
39090            Self::SCALED_IMU2(body) => body.ser(version, bytes),
39091            Self::SCALED_IMU3(body) => body.ser(version, bytes),
39092            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
39093            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
39094            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
39095            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
39096            Self::SERIAL_UDB_EXTRA_F13(body) => body.ser(version, bytes),
39097            Self::SERIAL_UDB_EXTRA_F14(body) => body.ser(version, bytes),
39098            Self::SERIAL_UDB_EXTRA_F15(body) => body.ser(version, bytes),
39099            Self::SERIAL_UDB_EXTRA_F16(body) => body.ser(version, bytes),
39100            Self::SERIAL_UDB_EXTRA_F17(body) => body.ser(version, bytes),
39101            Self::SERIAL_UDB_EXTRA_F18(body) => body.ser(version, bytes),
39102            Self::SERIAL_UDB_EXTRA_F19(body) => body.ser(version, bytes),
39103            Self::SERIAL_UDB_EXTRA_F20(body) => body.ser(version, bytes),
39104            Self::SERIAL_UDB_EXTRA_F21(body) => body.ser(version, bytes),
39105            Self::SERIAL_UDB_EXTRA_F22(body) => body.ser(version, bytes),
39106            Self::SERIAL_UDB_EXTRA_F2_A(body) => body.ser(version, bytes),
39107            Self::SERIAL_UDB_EXTRA_F2_B(body) => body.ser(version, bytes),
39108            Self::SERIAL_UDB_EXTRA_F4(body) => body.ser(version, bytes),
39109            Self::SERIAL_UDB_EXTRA_F5(body) => body.ser(version, bytes),
39110            Self::SERIAL_UDB_EXTRA_F6(body) => body.ser(version, bytes),
39111            Self::SERIAL_UDB_EXTRA_F7(body) => body.ser(version, bytes),
39112            Self::SERIAL_UDB_EXTRA_F8(body) => body.ser(version, bytes),
39113            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
39114            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
39115            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
39116            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
39117            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
39118            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
39119            Self::SET_MODE(body) => body.ser(version, bytes),
39120            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
39121            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
39122            Self::SIM_STATE(body) => body.ser(version, bytes),
39123            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
39124            Self::STATUSTEXT(body) => body.ser(version, bytes),
39125            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
39126            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
39127            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
39128            Self::SYS_STATUS(body) => body.ser(version, bytes),
39129            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
39130            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
39131            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
39132            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
39133            Self::TIMESYNC(body) => body.ser(version, bytes),
39134            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
39135            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
39136            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
39137            Self::TUNNEL(body) => body.ser(version, bytes),
39138            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
39139            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
39140            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
39141            Self::V2_EXTENSION(body) => body.ser(version, bytes),
39142            Self::VFR_HUD(body) => body.ser(version, bytes),
39143            Self::VIBRATION(body) => body.ser(version, bytes),
39144            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
39145            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
39146            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
39147            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
39148            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
39149            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
39150            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
39151            Self::WINCH_STATUS(body) => body.ser(version, bytes),
39152            Self::WIND_COV(body) => body.ser(version, bytes),
39153        }
39154    }
39155    fn extra_crc(id: u32) -> u8 {
39156        match id {
39157            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
39158            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
39159            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
39160            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::EXTRA_CRC,
39161            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
39162            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
39163            ALTITUDES_DATA::ID => ALTITUDES_DATA::EXTRA_CRC,
39164            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
39165            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
39166            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
39167            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
39168            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
39169            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
39170            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
39171                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
39172            }
39173            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
39174            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
39175            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
39176            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
39177            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
39178            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
39179            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
39180            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
39181            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
39182            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
39183            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
39184            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
39185            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
39186            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
39187            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
39188            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
39189            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
39190            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
39191            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
39192            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
39193            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
39194            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
39195            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
39196            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
39197            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
39198            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
39199            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
39200            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
39201            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
39202            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
39203            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
39204            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
39205            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
39206            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
39207            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
39208            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
39209            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
39210            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
39211            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
39212            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
39213            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
39214            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
39215            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
39216            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
39217            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
39218            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
39219            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
39220            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
39221            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::EXTRA_CRC,
39222            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
39223                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::EXTRA_CRC
39224            }
39225            FLEXIFUNCTION_COMMAND_DATA::ID => FLEXIFUNCTION_COMMAND_DATA::EXTRA_CRC,
39226            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => FLEXIFUNCTION_COMMAND_ACK_DATA::EXTRA_CRC,
39227            FLEXIFUNCTION_DIRECTORY_DATA::ID => FLEXIFUNCTION_DIRECTORY_DATA::EXTRA_CRC,
39228            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => FLEXIFUNCTION_DIRECTORY_ACK_DATA::EXTRA_CRC,
39229            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::EXTRA_CRC,
39230            FLEXIFUNCTION_SET_DATA::ID => FLEXIFUNCTION_SET_DATA::EXTRA_CRC,
39231            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
39232            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
39233            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
39234            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
39235            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
39236            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
39237            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
39238            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
39239            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
39240            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
39241                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
39242            }
39243            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
39244            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
39245            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
39246            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
39247            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
39248                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
39249            }
39250            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
39251            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
39252            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39253            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
39254            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
39255            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
39256            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
39257            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
39258            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
39259            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
39260            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
39261            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
39262            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
39263            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
39264            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
39265            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
39266            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
39267            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
39268            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
39269            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
39270            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
39271            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
39272            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
39273            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
39274            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
39275            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
39276            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
39277            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
39278            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
39279            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
39280                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
39281            }
39282            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
39283            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
39284            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
39285            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
39286            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
39287            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
39288            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
39289            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
39290            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
39291            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
39292            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
39293            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
39294            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
39295            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
39296            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
39297            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
39298            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
39299            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
39300            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
39301            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
39302            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
39303            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
39304            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
39305            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
39306            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
39307            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
39308            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
39309            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
39310            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
39311            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
39312            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
39313            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
39314            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
39315            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
39316            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
39317            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
39318            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
39319            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
39320            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
39321            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
39322            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
39323            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
39324            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
39325            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
39326            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
39327            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
39328            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
39329            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
39330            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
39331            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
39332            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
39333            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
39334            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
39335            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
39336            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
39337            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
39338            PING_DATA::ID => PING_DATA::EXTRA_CRC,
39339            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
39340            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
39341            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
39342            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39343            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
39344            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
39345            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
39346            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
39347            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
39348            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
39349            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
39350            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
39351            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
39352            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
39353            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
39354            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
39355            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
39356            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
39357            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
39358            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
39359            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
39360            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
39361            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
39362            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
39363            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
39364            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
39365            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
39366            SERIAL_UDB_EXTRA_F13_DATA::ID => SERIAL_UDB_EXTRA_F13_DATA::EXTRA_CRC,
39367            SERIAL_UDB_EXTRA_F14_DATA::ID => SERIAL_UDB_EXTRA_F14_DATA::EXTRA_CRC,
39368            SERIAL_UDB_EXTRA_F15_DATA::ID => SERIAL_UDB_EXTRA_F15_DATA::EXTRA_CRC,
39369            SERIAL_UDB_EXTRA_F16_DATA::ID => SERIAL_UDB_EXTRA_F16_DATA::EXTRA_CRC,
39370            SERIAL_UDB_EXTRA_F17_DATA::ID => SERIAL_UDB_EXTRA_F17_DATA::EXTRA_CRC,
39371            SERIAL_UDB_EXTRA_F18_DATA::ID => SERIAL_UDB_EXTRA_F18_DATA::EXTRA_CRC,
39372            SERIAL_UDB_EXTRA_F19_DATA::ID => SERIAL_UDB_EXTRA_F19_DATA::EXTRA_CRC,
39373            SERIAL_UDB_EXTRA_F20_DATA::ID => SERIAL_UDB_EXTRA_F20_DATA::EXTRA_CRC,
39374            SERIAL_UDB_EXTRA_F21_DATA::ID => SERIAL_UDB_EXTRA_F21_DATA::EXTRA_CRC,
39375            SERIAL_UDB_EXTRA_F22_DATA::ID => SERIAL_UDB_EXTRA_F22_DATA::EXTRA_CRC,
39376            SERIAL_UDB_EXTRA_F2_A_DATA::ID => SERIAL_UDB_EXTRA_F2_A_DATA::EXTRA_CRC,
39377            SERIAL_UDB_EXTRA_F2_B_DATA::ID => SERIAL_UDB_EXTRA_F2_B_DATA::EXTRA_CRC,
39378            SERIAL_UDB_EXTRA_F4_DATA::ID => SERIAL_UDB_EXTRA_F4_DATA::EXTRA_CRC,
39379            SERIAL_UDB_EXTRA_F5_DATA::ID => SERIAL_UDB_EXTRA_F5_DATA::EXTRA_CRC,
39380            SERIAL_UDB_EXTRA_F6_DATA::ID => SERIAL_UDB_EXTRA_F6_DATA::EXTRA_CRC,
39381            SERIAL_UDB_EXTRA_F7_DATA::ID => SERIAL_UDB_EXTRA_F7_DATA::EXTRA_CRC,
39382            SERIAL_UDB_EXTRA_F8_DATA::ID => SERIAL_UDB_EXTRA_F8_DATA::EXTRA_CRC,
39383            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
39384            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
39385            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
39386            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
39387            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39388            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
39389            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
39390            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
39391                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
39392            }
39393            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39394            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
39395            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
39396            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
39397            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
39398            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
39399            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
39400            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
39401            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
39402            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
39403            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
39404            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
39405            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
39406            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
39407            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
39408                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
39409            }
39410            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
39411                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
39412            }
39413            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
39414            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
39415            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
39416            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
39417            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
39418            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
39419            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
39420            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39421            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
39422            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
39423            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39424            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
39425            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
39426            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
39427            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
39428            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
39429            _ => 0,
39430        }
39431    }
39432    fn target_system_id(&self) -> Option<u8> {
39433        match self {
39434            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
39435            Self::CANFD_FRAME(inner) => Some(inner.target_system),
39436            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
39437            Self::CAN_FRAME(inner) => Some(inner.target_system),
39438            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
39439            Self::COMMAND_ACK(inner) => Some(inner.target_system),
39440            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
39441            Self::COMMAND_INT(inner) => Some(inner.target_system),
39442            Self::COMMAND_LONG(inner) => Some(inner.target_system),
39443            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
39444            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_system),
39445            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_system),
39446            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_system),
39447            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_system),
39448            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_system),
39449            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_system),
39450            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_system),
39451            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
39452            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
39453            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
39454            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
39455            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
39456            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
39457            Self::LOGGING_ACK(inner) => Some(inner.target_system),
39458            Self::LOGGING_DATA(inner) => Some(inner.target_system),
39459            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
39460            Self::LOG_ERASE(inner) => Some(inner.target_system),
39461            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
39462            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
39463            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
39464            Self::MISSION_ACK(inner) => Some(inner.target_system),
39465            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
39466            Self::MISSION_COUNT(inner) => Some(inner.target_system),
39467            Self::MISSION_ITEM(inner) => Some(inner.target_system),
39468            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
39469            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
39470            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
39471            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
39472            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
39473            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
39474            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
39475            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
39476            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
39477            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
39478            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
39479            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
39480            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
39481            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
39482            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
39483            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
39484            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
39485            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
39486            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
39487            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
39488            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
39489            Self::PARAM_SET(inner) => Some(inner.target_system),
39490            Self::PING(inner) => Some(inner.target_system),
39491            Self::PLAY_TUNE(inner) => Some(inner.target_system),
39492            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
39493            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
39494            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
39495            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
39496            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
39497            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
39498            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
39499            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
39500            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
39501            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
39502            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
39503            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
39504            Self::SET_MODE(inner) => Some(inner.target_system),
39505            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
39506            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
39507            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
39508            Self::TIMESYNC(inner) => Some(inner.target_system),
39509            Self::TUNNEL(inner) => Some(inner.target_system),
39510            Self::V2_EXTENSION(inner) => Some(inner.target_system),
39511            _ => None,
39512        }
39513    }
39514    fn target_component_id(&self) -> Option<u8> {
39515        match self {
39516            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
39517            Self::CANFD_FRAME(inner) => Some(inner.target_component),
39518            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
39519            Self::CAN_FRAME(inner) => Some(inner.target_component),
39520            Self::COMMAND_ACK(inner) => Some(inner.target_component),
39521            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
39522            Self::COMMAND_INT(inner) => Some(inner.target_component),
39523            Self::COMMAND_LONG(inner) => Some(inner.target_component),
39524            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
39525            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_component),
39526            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_component),
39527            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_component),
39528            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_component),
39529            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_component),
39530            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_component),
39531            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_component),
39532            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
39533            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
39534            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
39535            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
39536            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
39537            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
39538            Self::LOGGING_ACK(inner) => Some(inner.target_component),
39539            Self::LOGGING_DATA(inner) => Some(inner.target_component),
39540            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
39541            Self::LOG_ERASE(inner) => Some(inner.target_component),
39542            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
39543            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
39544            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
39545            Self::MISSION_ACK(inner) => Some(inner.target_component),
39546            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
39547            Self::MISSION_COUNT(inner) => Some(inner.target_component),
39548            Self::MISSION_ITEM(inner) => Some(inner.target_component),
39549            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
39550            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
39551            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
39552            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
39553            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
39554            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
39555            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
39556            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
39557            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
39558            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
39559            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
39560            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
39561            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
39562            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
39563            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
39564            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
39565            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
39566            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
39567            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
39568            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
39569            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
39570            Self::PARAM_SET(inner) => Some(inner.target_component),
39571            Self::PING(inner) => Some(inner.target_component),
39572            Self::PLAY_TUNE(inner) => Some(inner.target_component),
39573            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
39574            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
39575            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
39576            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
39577            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
39578            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
39579            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
39580            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
39581            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
39582            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
39583            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
39584            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
39585            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
39586            Self::TIMESYNC(inner) => Some(inner.target_component),
39587            Self::TUNNEL(inner) => Some(inner.target_component),
39588            Self::V2_EXTENSION(inner) => Some(inner.target_component),
39589            _ => None,
39590        }
39591    }
39592}